aboutsummaryrefslogtreecommitdiff
path: root/t/t5510-fetch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-07-19 13:22:21 -0700
committerJunio C Hamano <gitster@pobox.com>2016-07-19 13:22:21 -0700
commit566fdaf611f44724120412a43132c07b020fc4f1 (patch)
tree4b8d056b29834761c79fd250a5c38ab3bfd1ab0d /t/t5510-fetch.sh
parent39cadeec0db35a79a2713eceaf998f2745236f0c (diff)
parentbc437d10202c015a5733f706dc44fa6bbf4d85b9 (diff)
downloadgit-566fdaf611f44724120412a43132c07b020fc4f1.tar.gz
git-566fdaf611f44724120412a43132c07b020fc4f1.tar.xz
Merge branch 'nd/fetch-ref-summary'
Improve the look of the way "git fetch" reports what happened to each ref that was fetched. * nd/fetch-ref-summary: fetch: reduce duplicate in ref update status lines with placeholder fetch: align all "remote -> local" output fetch: change flag code for displaying tag update and deleted ref fetch: refactor ref update status formatting code git-fetch.txt: document fetch output
Diffstat (limited to 't/t5510-fetch.sh')
-rwxr-xr-xt/t5510-fetch.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/t/t5510-fetch.sh b/t/t5510-fetch.sh
index 88076da1e..6bd485307 100755
--- a/t/t5510-fetch.sh
+++ b/t/t5510-fetch.sh
@@ -688,4 +688,34 @@ test_expect_success 'fetching with auto-gc does not lock up' '
)
'
+test_expect_success 'fetch aligned output' '
+ git clone . full-output &&
+ test_commit looooooooooooong-tag &&
+ (
+ cd full-output &&
+ git -c fetch.output=full fetch origin 2>&1 | \
+ grep -e "->" | cut -c 22- >../actual
+ ) &&
+ cat >expect <<-\EOF &&
+ master -> origin/master
+ looooooooooooong-tag -> looooooooooooong-tag
+ EOF
+ test_cmp expect actual
+'
+
+test_expect_success 'fetch compact output' '
+ git clone . compact &&
+ test_commit extraaa &&
+ (
+ cd compact &&
+ git -c fetch.output=compact fetch origin 2>&1 | \
+ grep -e "->" | cut -c 22- >../actual
+ ) &&
+ cat >expect <<-\EOF &&
+ master -> origin/*
+ extraaa -> *
+ EOF
+ test_cmp expect actual
+'
+
test_done