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 | |
parent | Sync with 1.8.5.2 (diff) | |
download | tgif-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')
-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 5d4581dac8..87e896d3a3 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 |