feat: support <pattern> for git-for-each-ref (git_branches) (#1248)

This commit is contained in:
Anthony Nichols
2021-09-16 04:58:59 -05:00
committed by GitHub
parent 2c71ffec07
commit 5f0ccf1346
3 changed files with 6 additions and 1 deletions

View File

@@ -195,7 +195,10 @@ git.branches = function(opts)
.. "%(authorname)"
.. "%(upstream:lstrip=2)"
.. "%(committerdate:format-local:%Y/%m/%d %H:%M:%S)"
local output = utils.get_os_command_output({ "git", "for-each-ref", "--perl", "--format", format }, opts.cwd)
local output = utils.get_os_command_output(
{ "git", "for-each-ref", "--perl", "--format", format, opts.pattern },
opts.cwd
)
local results = {}
local widths = {