diff options
Diffstat (limited to 't/t8008-blame-formats.sh')
-rwxr-xr-x | t/t8008-blame-formats.sh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/t/t8008-blame-formats.sh b/t/t8008-blame-formats.sh index d15f8b3d47..92c8e792d1 100755 --- a/t/t8008-blame-formats.sh +++ b/t/t8008-blame-formats.sh @@ -5,7 +5,7 @@ test_description='blame output in various formats on a simple case' test_expect_success 'setup' ' echo a >file && - git add file + git add file && test_tick && git commit -m one && echo b >>file && @@ -87,4 +87,21 @@ test_expect_success 'blame --line-porcelain output' ' test_cmp expect actual ' +test_expect_success '--porcelain detects first non-blank line as subject' ' + ( + GIT_INDEX_FILE=.git/tmp-index && + export GIT_INDEX_FILE && + echo "This is it" >single-file && + git add single-file && + tree=$(git write-tree) && + commit=$(printf "%s\n%s\n%s\n\n\n \noneline\n\nbody\n" \ + "tree $tree" \ + "author A <a@b.c> 123456789 +0000" \ + "committer C <c@d.e> 123456789 +0000" | + git hash-object -w -t commit --stdin) && + git blame --porcelain $commit -- single-file >output && + grep "^summary oneline$" output + ) +' + test_done |