diff options
author | Tom Miller <jackerran@gmail.com> | 2014-01-02 20:28:51 -0600 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-01-03 10:13:39 -0800 |
commit | 4b3b33a747c325f76b1f6eef89c231609dd4d361 (patch) | |
tree | 17b2e0b5025912311beb08f86289405c2d2a70d1 /t/t5510-fetch.sh | |
parent | 7794a680e63a2a11b73cb1194653662f2769a792 (diff) | |
download | git-4b3b33a747c325f76b1f6eef89c231609dd4d361.tar.gz git-4b3b33a747c325f76b1f6eef89c231609dd4d361.tar.xz |
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-x | t/t5510-fetch.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh index 5d4581dac..87e896d3a 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 |