summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-06-09 18:30:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-06-09 18:30:13 (GMT)
commit07768e03b5a5efc9d768d6afc6246d2ec345cace (patch)
tree34c7bd86258ada7c6801b1c75041e1b2e9c8b9fc
parent251cb96eabb983ee1b699254399642b306cf19bf (diff)
parenteb077745a4f22183faec93e46e053ccddabcc88b (diff)
downloadgit-07768e03b5a5efc9d768d6afc6246d2ec345cace.zip
git-07768e03b5a5efc9d768d6afc6246d2ec345cace.tar.gz
git-07768e03b5a5efc9d768d6afc6246d2ec345cace.tar.bz2
Merge branch 'jc/shortlog-ref-exclude'
"log --exclude=<glob> --all | shortlog" worked as expected, but "shortlog --exclude=<glob> --all" was not accepted at the command line argument parser level. * jc/shortlog-ref-exclude: shortlog: allow --exclude=<glob> to be passed
-rw-r--r--revision.c1
-rwxr-xr-xt/t4201-shortlog.sh6
2 files changed, 7 insertions, 0 deletions
diff --git a/revision.c b/revision.c
index 71e2337..3818b46 100644
--- a/revision.c
+++ b/revision.c
@@ -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="))
{
diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh
index 4286699..97fcb31 100755
--- a/t/t4201-shortlog.sh
+++ b/t/t4201-shortlog.sh
@@ -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