summaryrefslogtreecommitdiff
path: root/t/t5514-fetch-multiple.sh
diff options
context:
space:
mode:
authorDan Johnson <computerdruid@gmail.com>2012-09-05 17:22:19 -0400
committerJunio C Hamano <gitster@pobox.com>2012-09-07 10:01:35 -0700
commit85566460897ee76555a7c90a951fe2d50272eb5e (patch)
treebdb819f0c49f17d4f33a38bcd3de518be99a8a09 /t/t5514-fetch-multiple.sh
parent50d89ad6542c8acafefa6d42f8b42dfa9b8fafe1 (diff)
downloadgit-85566460897ee76555a7c90a951fe2d50272eb5e.tar.gz
fetch --all: pass --tags/--no-tags through to each remote
When fetch is invoked with --all, we need to pass the tag-following preference to each individual fetch; without this, we will always auto-follow tags, preventing us from fetching the remote tags into a remote-specific namespace, for example. Reported-by: Oswald Buddenhagen <ossi@kde.org> Signed-off-by: Dan Johnson <ComputerDruid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5514-fetch-multiple.sh')
-rwxr-xr-xt/t5514-fetch-multiple.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/t/t5514-fetch-multiple.sh b/t/t5514-fetch-multiple.sh
index 227dd56137..0f8140957f 100755
--- a/t/t5514-fetch-multiple.sh
+++ b/t/t5514-fetch-multiple.sh
@@ -151,4 +151,34 @@ test_expect_success 'git fetch --multiple (ignoring skipFetchAll)' '
test_cmp ../expect output)
'
+test_expect_success 'git fetch --all --no-tags' '
+ >expect &&
+ git clone one test5 &&
+ git clone test5 test6 &&
+ (cd test5 && git tag test-tag) &&
+ (
+ cd test6 &&
+ git fetch --all --no-tags &&
+ git tag >output
+ ) &&
+ test_cmp expect test6/output
+'
+
+test_expect_success 'git fetch --all --tags' '
+ echo test-tag >expect &&
+ git clone one test7 &&
+ git clone test7 test8 &&
+ (
+ cd test7 &&
+ test_commit test-tag &&
+ git reset --hard HEAD^
+ ) &&
+ (
+ cd test8 &&
+ git fetch --all --tags &&
+ git tag >output
+ ) &&
+ test_cmp expect test8/output
+'
+
test_done