summaryrefslogtreecommitdiff
path: root/t/t6018-rev-list-glob.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-11-01 12:13:01 -0700
committerJunio C Hamano <gitster@pobox.com>2013-11-01 13:09:45 -0700
commit9dc01bf0631b51dfe497d57942a9085e0808e205 (patch)
tree219613f78b4449d6924e69e9bd3e3848ee53f89d /t/t6018-rev-list-glob.sh
parentff32d3420a550d3811e745af7f2ccc77fb026b7b (diff)
downloadgit-9dc01bf0631b51dfe497d57942a9085e0808e205.tar.gz
rev-parse: introduce --exclude=<glob> to tame wildcardsjc/ref-excludes
Teach "rev-parse" the same "I'm going to glob, but omit the ones that match these patterns" feature as "rev-list". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t6018-rev-list-glob.sh')
-rwxr-xr-xt/t6018-rev-list-glob.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t6018-rev-list-glob.sh b/t/t6018-rev-list-glob.sh
index 77ef3234b3..d00f7db868 100755
--- a/t/t6018-rev-list-glob.sh
+++ b/t/t6018-rev-list-glob.sh
@@ -129,6 +129,18 @@ test_expect_success 'rev-parse --remotes=foo' '
'
+test_expect_success 'rev-parse --exclude with --branches' '
+ compare rev-parse "--exclude=*/* --branches" "master someref subspace-x"
+'
+
+test_expect_success 'rev-parse --exclude with --all' '
+ compare rev-parse "--exclude=refs/remotes/* --all" "--branches --tags"
+'
+
+test_expect_success 'rev-parse accumulates multiple --exclude' '
+ compare rev-parse "--exclude=refs/remotes/* --exclude=refs/tags/* --all" --branches
+'
+
test_expect_success 'rev-list --glob=refs/heads/subspace/*' '
compare rev-list "subspace/one subspace/two" "--glob=refs/heads/subspace/*"