(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ (Token id:Id.Lit_Chars val:'git blame textconv support' span_id:6))} spids: [4] ) ] ) (C {(.)} {(./test-lib.sh)}) (command.ShFunction name: find_blame body: (command.BraceGroup children: [(C {(sed)} {(-e)} {(SQ (Token id:Id.Lit_Chars val:'s/^[^(]*//' span_id:26))})] ) ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:34) fd:-1 arg_word:{(helper)}) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:37) fd: -1 here_begin: {(SQ (Token id:Id.Lit_Chars val:EOF span_id:39))} here_end_span_id: 45 stdin_parts: [ ('#!/bin/sh\n') ('grep -q \'^bin: \' "$1" || { echo "E: $1 is not \\"binary\\" file" 1>&2; exit 1; }\n') ('"$PERL_PATH" -p -e \'s/^bin: /converted: /\' "$1"\n') ] ) ] ) (C {(chmod)} {(Id.Lit_Other '+') (x)} {(helper)}) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup ' span_id:57))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:61) (Token id: Id.Lit_Chars val: '\techo "bin: test number 0" >zero.bin &&\n' span_id: 62 ) (Token id:Id.Lit_Chars val:'\techo "bin: test 1" >one.bin &&\n' span_id:63) (Token id: Id.Lit_Chars val: '\techo "bin: test number 2" >two.bin &&\n' span_id: 64 ) (Token id:Id.Lit_Chars val:'\ttest_ln_s_add one.bin symlink.bin &&\n' span_id:65) (Token id:Id.Lit_Chars val:'\tgit add . &&\n' span_id:66) (Token id: Id.Lit_Chars val: '\tGIT_AUTHOR_NAME=Number1 git commit -a -m First --date="2010-01-01 18:00:00" &&\n' span_id: 67 ) (Token id:Id.Lit_Chars val:'\techo "bin: test 1 version 2" >one.bin &&\n' span_id:68) (Token id: Id.Lit_Chars val: '\techo "bin: test number 2 version 2" >>two.bin &&\n' span_id: 69 ) (Token id:Id.Lit_Chars val:'\trm -f symlink.bin &&\n' span_id:70) (Token id:Id.Lit_Chars val:'\ttest_ln_s_add two.bin symlink.bin &&\n' span_id:71) (Token id: Id.Lit_Chars val: '\tGIT_AUTHOR_NAME=Number2 git commit -a -m Second --date="2010-01-01 20:00:00"\n' span_id: 72 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:78) fd: -1 arg_word: {(expected)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:81) fd: -1 here_begin: {(EOF)} here_end_span_id: 86 stdin_parts: [('(Number2 2010-01-01 20:00:00 +0000 1) bin: test 1 version 2\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'no filter specified' span_id:91))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:95) (Token id:Id.Lit_Chars val:'\tgit blame one.bin >blame &&\n' span_id:96) (Token id:Id.Lit_Chars val:'\tfind_blame Number2 <blame >result &&\n' span_id:97) (Token id:Id.Lit_Chars val:'\ttest_cmp expected result\n' span_id:98) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup textconv filters' span_id:105))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:109) (Token id: Id.Lit_Chars val: '\techo "*.bin diff=test" >.gitattributes &&\n' span_id: 110 ) (Token id:Id.Lit_Chars val:'\techo "zero.bin eol=crlf" >>.gitattributes &&\n' span_id:111) (Token id: Id.Lit_Chars val: '\tgit config diff.test.textconv ./helper &&\n' span_id: 112 ) (Token id:Id.Lit_Chars val:'\tgit config diff.test.cachetextconv false\n' span_id:113) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'blame with --no-textconv' span_id:120))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:124) (Token id: Id.Lit_Chars val: '\tgit blame --no-textconv one.bin >blame &&\n' span_id: 125 ) (Token id:Id.Lit_Chars val:'\tfind_blame <blame> result &&\n' span_id:126) (Token id:Id.Lit_Chars val:'\ttest_cmp expected result\n' span_id:127) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:133) fd: -1 arg_word: {(expected)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:136) fd: -1 here_begin: {(EOF)} here_end_span_id: 141 stdin_parts: [('(Number2 2010-01-01 20:00:00 +0000 1) converted: test 1 version 2\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'basic blame on last commit' span_id:146))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:150) (Token id:Id.Lit_Chars val:'\tgit blame one.bin >blame &&\n' span_id:151) (Token id:Id.Lit_Chars val:'\tfind_blame <blame >result &&\n' span_id:152) (Token id:Id.Lit_Chars val:'\ttest_cmp expected result\n' span_id:153) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:159) fd: -1 arg_word: {(expected)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:162) fd: -1 here_begin: {(EOF)} here_end_span_id: 168 stdin_parts: [ ('(Number1 2010-01-01 18:00:00 +0000 1) converted: test number 2\n') ('(Number2 2010-01-01 20:00:00 +0000 2) converted: test number 2 version 2\n') ] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'blame --textconv going through revisions' span_id:173))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:177) (Token id: Id.Lit_Chars val: '\tgit blame --textconv two.bin >blame &&\n' span_id: 178 ) (Token id:Id.Lit_Chars val:'\tfind_blame <blame >result &&\n' span_id:179) (Token id:Id.Lit_Chars val:'\ttest_cmp expected result\n' span_id:180) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'blame --textconv with local changes' span_id:187))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:191) (Token id: Id.Lit_Chars val: '\ttest_when_finished "git checkout zero.bin" &&\n' span_id: 192 ) (Token id:Id.Lit_Chars val:'\tprintf "bin: updated number 0\\015" >zero.bin &&\n' span_id:193) (Token id: Id.Lit_Chars val: '\tgit blame --textconv zero.bin >blame &&\n' span_id: 194 ) (Token id: Id.Lit_Chars val: '\texpect="(Not Committed Yet ....-..-.. ..:..:.. +0000 1)" &&\n' span_id: 195 ) (Token id:Id.Lit_Chars val:'\texpect="$expect converted: updated number 0" &&\n' span_id:196) (Token id: Id.Lit_Chars val: '\texpr "$(find_blame <blame)" : "^$expect"\n' span_id: 197 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup +cachetextconv' span_id:204))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:208) (Token id: Id.Lit_Chars val: '\tgit config diff.test.cachetextconv true\n' span_id: 209 ) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:215) fd: -1 arg_word: {(expected_one)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:218) fd: -1 here_begin: {(EOF)} here_end_span_id: 223 stdin_parts: [('(Number2 2010-01-01 20:00:00 +0000 1) converted: test 1 version 2\n')] ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'blame --textconv works with textconvcache' span_id:228))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:232) (Token id: Id.Lit_Chars val: '\tgit blame --textconv two.bin >blame &&\n' span_id: 233 ) (Token id:Id.Lit_Chars val:'\tfind_blame <blame >result &&\n' span_id:234) (Token id:Id.Lit_Chars val:'\ttest_cmp expected result &&\n' span_id:235) (Token id:Id.Lit_Chars val:'\tgit blame --textconv one.bin >blame &&\n' span_id:236) (Token id:Id.Lit_Chars val:'\tfind_blame <blame >result &&\n' span_id:237) (Token id:Id.Lit_Chars val:'\ttest_cmp expected_one result\n' span_id:238) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'setup -cachetextconv' span_id:245))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:249) (Token id: Id.Lit_Chars val: '\tgit config diff.test.cachetextconv false\n' span_id: 250 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'make a new commit' span_id:257))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:261) (Token id: Id.Lit_Chars val: '\techo "bin: test number 2 version 3" >>two.bin &&\n' span_id: 262 ) (Token id: Id.Lit_Chars val: '\tGIT_AUTHOR_NAME=Number3 git commit -a -m Third --date="2010-01-01 22:00:00"\n' span_id: 263 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'blame from previous revision' span_id:270))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:274) (Token id:Id.Lit_Chars val:'\tgit blame HEAD^ two.bin >blame &&\n' span_id:275) (Token id:Id.Lit_Chars val:'\tfind_blame <blame >result &&\n' span_id:276) (Token id:Id.Lit_Chars val:'\ttest_cmp expected result\n' span_id:277) ) } ) (command.Simple words: [{(cat)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:283) fd: -1 arg_word: {(expected)} ) (redir.HereDoc op: (Token id:Id.Redir_DLess val:'<<' span_id:286) fd: -1 here_begin: {(EOF)} here_end_span_id: 291 stdin_parts: [('(Number2 2010-01-01 20:00:00 +0000 1) two.bin\n')] ) ] ) (C {(test_expect_success)} {(SYMLINKS)} {(SQ (Token id:Id.Lit_Chars val:'blame with --no-textconv (on symlink)' span_id:298))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:302) (Token id: Id.Lit_Chars val: '\tgit blame --no-textconv symlink.bin >blame &&\n' span_id: 303 ) (Token id:Id.Lit_Chars val:'\tfind_blame <blame >result &&\n' span_id:304) (Token id:Id.Lit_Chars val:'\ttest_cmp expected result\n' span_id:305) ) } ) (C {(test_expect_success)} {(SYMLINKS)} {(SQ (Token id:Id.Lit_Chars val:'blame --textconv (on symlink)' span_id:314))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:318) (Token id: Id.Lit_Chars val: '\tgit blame --textconv symlink.bin >blame &&\n' span_id: 319 ) (Token id:Id.Lit_Chars val:'\tfind_blame <blame >result &&\n' span_id:320) (Token id:Id.Lit_Chars val:'\ttest_cmp expected result\n' span_id:321) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'make another new commit' span_id:334))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:338) (Token id:Id.Lit_Chars val:'\tcat >three.bin <<\\EOF &&\n' span_id:339) (Token id:Id.Lit_Chars val:'bin: test number 2\n' span_id:340) (Token id:Id.Lit_Chars val:'bin: test number 2 version 2\n' span_id:341) (Token id:Id.Lit_Chars val:'bin: test number 2 version 3\n' span_id:342) (Token id:Id.Lit_Chars val:'bin: test number 3\n' span_id:343) (Token id:Id.Lit_Chars val:'EOF\n' span_id:344) (Token id:Id.Lit_Chars val:'\tgit add three.bin &&\n' span_id:345) (Token id: Id.Lit_Chars val: '\tGIT_AUTHOR_NAME=Number4 git commit -a -m Fourth --date="2010-01-01 23:00:00"\n' span_id: 346 ) ) } ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'blame on last commit (-C -C, symlink)' span_id:353))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:357) (Token id:Id.Lit_Chars val:'\tgit blame -C -C three.bin >blame &&\n' span_id:358) (Token id:Id.Lit_Chars val:'\tfind_blame <blame >result &&\n' span_id:359) (Token id:Id.Lit_Chars val:'\tcat >expected <<\\EOF &&\n' span_id:360) (Token id: Id.Lit_Chars val: '(Number1 2010-01-01 18:00:00 +0000 1) converted: test number 2\n' span_id: 361 ) (Token id: Id.Lit_Chars val: '(Number2 2010-01-01 20:00:00 +0000 2) converted: test number 2 version 2\n' span_id: 362 ) (Token id: Id.Lit_Chars val: '(Number3 2010-01-01 22:00:00 +0000 3) converted: test number 2 version 3\n' span_id: 363 ) (Token id: Id.Lit_Chars val: '(Number4 2010-01-01 23:00:00 +0000 4) converted: test number 3\n' span_id: 364 ) (Token id:Id.Lit_Chars val:'EOF\n' span_id:365) (Token id:Id.Lit_Chars val:'\ttest_cmp expected result\n' span_id:366) ) } ) (C {(test_done)}) ] )