(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description spids:[4]) op: Equal rhs: {(SQ <'blame output in various formats on a simple case'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ <setup>)} { (SQ <'\n'> <'\techo a >file &&\n'> <'\tgit add file &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m one &&\n'> <'\techo b >>file &&\n'> <'\techo c >>file &&\n'> <'\techo d >>file &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -a -m two\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(SQ <EOF>)} here_end_span_id: 48 stdin_parts: [ ('^baf5e0b (A U Thor 2005-04-07 15:13:13 -0700 1) a\n') ('8825379d (A U Thor 2005-04-07 15:14:13 -0700 2) b\n') ('8825379d (A U Thor 2005-04-07 15:14:13 -0700 3) c\n') ('8825379d (A U Thor 2005-04-07 15:14:13 -0700 4) d\n') ] ) ] ) (C {(test_expect_success)} {(SQ <'normal blame output'>)} {(SQ <'\n'> <'\tgit blame file >actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ID1 spids:[62]) op: Equal rhs: {(baf5e0b3869e0b2b2beb395a3720c7b51eac94fc)} spids: [62] ) ] spids: [62] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMMIT1 spids:[65]) op: Equal rhs: { (SQ <'author A U Thor\n'> <'author-mail <author@example.com>\n'> <'author-time 1112911993\n'> <'author-tz -0700\n'> <'committer C O Mitter\n'> <'committer-mail <committer@example.com>\n'> <'committer-time 1112911993\n'> <'committer-tz -0700\n'> <'summary one\n'> <'boundary\n'> <'filename file'> ) } spids: [65] ) ] spids: [65] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:ID2 spids:[80]) op: Equal rhs: {(8825379dfb8a1267b58e8e5bcf69eec838f685ec)} spids: [80] ) ] spids: [80] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:COMMIT2 spids:[83]) op: Equal rhs: { (SQ <'author A U Thor\n'> <'author-mail <author@example.com>\n'> <'author-time 1112912053\n'> <'author-tz -0700\n'> <'committer C O Mitter\n'> <'committer-mail <committer@example.com>\n'> <'committer-time 1112912053\n'> <'committer-tz -0700\n'> <'summary two\n'> <'previous baf5e0b3869e0b2b2beb395a3720c7b51eac94fc file\n'> <'filename file'> ) } spids: [83] ) ] spids: [83] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 124 stdin_parts: [ ($ VSub_Name '$ID1') (' 1 1 1\n') ($ VSub_Name '$COMMIT1') ('\n') ('\ta\n') ($ VSub_Name '$ID2') (' 2 2 3\n') ($ VSub_Name '$COMMIT2') ('\n') ('\tb\n') ($ VSub_Name '$ID2') (' 3 3\n') ('\tc\n') ($ VSub_Name '$ID2') (' 4 4\n') ('\td\n') ] ) ] ) (C {(test_expect_success)} {(SQ <'blame --porcelain output'>)} {(SQ <'\n'> <'\tgit blame --porcelain file >actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(expect)}) (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 167 stdin_parts: [ ($ VSub_Name '$ID1') (' 1 1 1\n') ($ VSub_Name '$COMMIT1') ('\n') ('\ta\n') ($ VSub_Name '$ID2') (' 2 2 3\n') ($ VSub_Name '$COMMIT2') ('\n') ('\tb\n') ($ VSub_Name '$ID2') (' 3 3\n') ($ VSub_Name '$COMMIT2') ('\n') ('\tc\n') ($ VSub_Name '$ID2') (' 4 4\n') ($ VSub_Name '$COMMIT2') ('\n') ('\td\n') ] ) ] ) (C {(test_expect_success)} {(SQ <'blame --line-porcelain output'>)} {(SQ <'\n'> <'\tgit blame --line-porcelain file >actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (C {(test_expect_success)} {(SQ <'--porcelain detects first non-blank line as subject'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tGIT_INDEX_FILE=.git/tmp-index &&\n'> <'\t\texport GIT_INDEX_FILE &&\n'> <'\t\techo "This is it" >single-file &&\n'> <'\t\tgit add single-file &&\n'> <'\t\ttree=$(git write-tree) &&\n'> <'\t\tcommit=$(printf "%s\\n%s\\n%s\\n\\n\\n \\noneline\\n\\nbody\\n" \\\n'> <'\t\t\t"tree $tree" \\\n'> <'\t\t\t"author A <a@b.c> 123456789 +0000" \\\n'> <'\t\t\t"committer C <c@d.e> 123456789 +0000" |\n'> <'\t\tgit hash-object -w -t commit --stdin) &&\n'> <'\t\tgit blame --porcelain $commit -- single-file >output &&\n'> <'\t\tgrep "^summary oneline$" output\n'> <'\t)\n'> ) } ) (C {(test_done)}) ] )