Skip to content

Commit

Permalink
Merge branch 'jc/shortlog-ref-exclude' into maint
Browse files Browse the repository at this point in the history
"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
  • Loading branch information
Junio C Hamano committed Jun 25, 2014
2 parents c4f79d1 + eb07774 commit 8675779
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions revision.c
Original file line number Diff line number Diff line change
Expand Up @@ -1633,6 +1633,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
!strcmp(arg, "--reflog") || !strcmp(arg, "--not") ||
!strcmp(arg, "--no-walk") || !strcmp(arg, "--do-walk") ||
!strcmp(arg, "--bisect") || starts_with(arg, "--glob=") ||
starts_with(arg, "--exclude=") ||
starts_with(arg, "--branches=") || starts_with(arg, "--tags=") ||
starts_with(arg, "--remotes=") || starts_with(arg, "--no-walk="))
{
Expand Down
6 changes: 6 additions & 0 deletions t/t4201-shortlog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,10 @@ test_expect_success 'shortlog ignores commits with missing authors' '
test_cmp expect actual
'

test_expect_success 'shortlog with revision pseudo options' '
git shortlog --all &&
git shortlog --branches &&
git shortlog --exclude=refs/heads/m* --all
'

test_done

0 comments on commit 8675779

Please sign in to comment.