From: Lukas Fleischer <lfleischer@lfos.de>
To: git@vger.kernel.org
Subject: [PATCH 4/4] t5509: add basic tests for hideRefs
Date: Sun, 1 Nov 2015 20:34:23 +0100 [thread overview]
Message-ID: <1446406463-22527-5-git-send-email-lfleischer@lfos.de> (raw)
In-Reply-To: <1446406463-22527-1-git-send-email-lfleischer@lfos.de>
Test whether regular and full hideRefs patterns work as expected when
namespaces are used.
Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
---
t/t5509-fetch-push-namespaces.sh | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/t/t5509-fetch-push-namespaces.sh b/t/t5509-fetch-push-namespaces.sh
index cc0b31f..a3f1060 100755
--- a/t/t5509-fetch-push-namespaces.sh
+++ b/t/t5509-fetch-push-namespaces.sh
@@ -82,4 +82,33 @@ test_expect_success 'mirroring a repository using a ref namespace' '
)
'
+test_expect_success "Hide namespaced refs with transfer.hideRefs" '
+ cd pushee &&
+ test_config transfer.hideRefs refs/tags &&
+ GIT_NAMESPACE=namespace git ls-remote "ext::git %s ." >actual &&
+ printf "$commit1\trefs/heads/master\n" >expected &&
+ test_cmp expected actual &&
+ cd ..
+'
+
+test_expect_success "Check that transfer.hideRefs does not match unstripped refs" '
+ cd pushee &&
+ test_config transfer.hideRefs "refs/namespaces/namespace/refs/tags" &&
+ GIT_NAMESPACE=namespace git ls-remote "ext::git %s ." >actual &&
+ printf "$commit1\trefs/heads/master\n" >expected &&
+ printf "$commit0\trefs/tags/0\n" >>expected &&
+ printf "$commit1\trefs/tags/1\n" >>expected &&
+ test_cmp expected actual &&
+ cd ..
+'
+
+test_expect_success "Hide full refs with transfer.hideRefs" '
+ cd pushee &&
+ test_config transfer.hideRefs "^refs/namespaces/namespace/refs/tags" &&
+ GIT_NAMESPACE=namespace git ls-remote "ext::git %s ." >actual &&
+ printf "$commit1\trefs/heads/master\n" >expected &&
+ test_cmp expected actual &&
+ cd ..
+'
+
test_done
--
2.6.2
next prev parent reply other threads:[~2015-11-01 19:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-01 19:34 [PATCH 0/4] Improve hideRefs when used with namespaces Lukas Fleischer
2015-11-01 19:34 ` [PATCH 1/4] Document the semantics of hideRefs " Lukas Fleischer
2015-11-01 19:34 ` [PATCH 2/4] upload-pack: strip refs before calling ref_is_hidden() Lukas Fleischer
2015-11-01 19:34 ` [PATCH 3/4] Add support for matching full refs in hideRefs Lukas Fleischer
2015-11-01 20:42 ` Eric Sunshine
2015-11-02 5:47 ` Lukas Fleischer
2015-11-01 19:34 ` Lukas Fleischer [this message]
2015-11-01 21:13 ` [PATCH 4/4] t5509: add basic tests for hideRefs Eric Sunshine
2015-11-02 6:25 ` Lukas Fleischer
2015-11-02 7:30 ` Eric Sunshine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446406463-22527-5-git-send-email-lfleischer@lfos.de \
--to=lfleischer@lfos.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).