Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-11-01 23:13:01 +0400
committerJunio C Hamano <gitster@pobox.com>2013-11-02 00:09:45 +0400
commit9dc01bf0631b51dfe497d57942a9085e0808e205 (patch)
tree219613f78b4449d6924e69e9bd3e3848ee53f89d /t/t6018-rev-list-glob.sh
parentff32d3420a550d3811e745af7f2ccc77fb026b7b (diff)
rev-parse: introduce --exclude=<glob> to tame wildcards
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/*"