summaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorTom Miller <jackerran@gmail.com>2014-01-03 02:28:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-01-03 18:13:39 (GMT)
commit4b3b33a747c325f76b1f6eef89c231609dd4d361 (patch)
tree17b2e0b5025912311beb08f86289405c2d2a70d1 /t/t5510-fetch.sh
parent7794a680e63a2a11b73cb1194653662f2769a792 (diff)
downloadgit-4b3b33a747c325f76b1f6eef89c231609dd4d361.zip
git-4b3b33a747c325f76b1f6eef89c231609dd4d361.tar.gz
git-4b3b33a747c325f76b1f6eef89c231609dd4d361.tar.bz2
fetch --prune: always print header url
If "fetch --prune" is run with no new refs to fetch, but it has refs to prune. Then, the header url is not printed as it would if there were new refs to fetch. Output before this patch: $ git fetch --prune remote-with-no-new-refs x [deleted] (none) -> origin/world Output after this patch: $ git fetch --prune remote-with-no-new-refs From https://github.com/git/git x [deleted] (none) -> origin/test Signed-off-by: Tom Miller <jackerran@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 5d4581d..87e896d 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -614,4 +614,16 @@ test_expect_success 'all boundary commits are excluded' '
test_bundle_object_count .git/objects/pack/pack-${pack##pack }.pack 3
'
+test_expect_success 'fetch --prune prints the remotes url' '
+ git branch goodbye &&
+ git clone . only-prunes &&
+ git branch -D goodbye &&
+ (
+ cd only-prunes &&
+ git fetch --prune origin 2>&1 | head -n1 >../actual
+ ) &&
+ echo "From ${D}/." >expect &&
+ test_cmp expect actual
+'
+
test_done