fetch: reduce duplicate in ref update status lines with placeholder
[gitweb.git] / t / t5510-fetch.sh
index 454d896390c03667442ce12925066b14593b3cd1..603277655b5b44681ceab60bf4da5e02c54ee52e 100755 (executable)
@@ -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