]> granicus.if.org Git - git/commitdiff
t4205: unfold across multiple lines
authorTaylor Blau <me@ttaylorr.com>
Mon, 2 Oct 2017 05:25:19 +0000 (22:25 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 2 Oct 2017 06:34:43 +0000 (15:34 +0900)
Tests in t4205 test the following:

  git log --format='%(trailers:unfold)' ...

By ensuring the multi-line trailers are unfolded back onto the same
line. t4205 only includes tests for 2-line trailers, but `unfold()` will
fail for folded trailers on 3 or more lines.

In preparation for adding subsequent tests in t6300 that test similar
behavior in `git-for-each-ref(1)`, let's harden t4205 (and make it
consistent with the changes in t6300) by ensuring that 3 or more
line folded trailers are unfolded correctly.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4205-log-pretty-formats.sh

index 977472f5390fbe6d1a19c52dd70692ca55dff505..591f35daaf5825cfdcf8e7fccf4f52462bbf8f78 100755 (executable)
@@ -544,7 +544,7 @@ Signed-off-by: A U Thor
 EOF
 
 unfold () {
-       perl -0pe 's/\n\s+/ /'
+       perl -0pe 's/\n\s+/ /g'
 }
 
 test_expect_success 'set up trailer tests' '