Skip to content

Commit 8675779

Browse files
committed
Merge branch 'jc/shortlog-ref-exclude' into maint
"git log --exclude=<glob> --all | git shortlog" worked as expected, but "git shortlog --exclude=<glob> --all", which is supposed to be identical to the above pipeline, was not accepted at the command line argument parser level. * jc/shortlog-ref-exclude: shortlog: allow --exclude=<glob> to be passed
2 parents c4f79d1 + eb07774 commit 8675779

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

revision.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1633,6 +1633,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
16331633
!strcmp(arg, "--reflog") || !strcmp(arg, "--not") ||
16341634
!strcmp(arg, "--no-walk") || !strcmp(arg, "--do-walk") ||
16351635
!strcmp(arg, "--bisect") || starts_with(arg, "--glob=") ||
1636+
starts_with(arg, "--exclude=") ||
16361637
starts_with(arg, "--branches=") || starts_with(arg, "--tags=") ||
16371638
starts_with(arg, "--remotes=") || starts_with(arg, "--no-walk="))
16381639
{

t/t4201-shortlog.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,10 @@ test_expect_success 'shortlog ignores commits with missing authors' '
188188
test_cmp expect actual
189189
'
190190

191+
test_expect_success 'shortlog with revision pseudo options' '
192+
git shortlog --all &&
193+
git shortlog --branches &&
194+
git shortlog --exclude=refs/heads/m* --all
195+
'
196+
191197
test_done

0 commit comments

Comments
 (0)