(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description) op: assign_op.Equal rhs: {(SQ <'git blame textconv support'>)} spids: [4] ) ] redirects: [] ) (C {<.>} {<'./test-lib.sh'>}) (command.ShFunction name: find_blame body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [(C {<sed>} {<-e>} {(SQ <'s/^[^(]*//'>)})] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<helper>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(SQ <EOF>)} 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'> ] ) ) ] more_env: [] do_fork: T ) (C {<chmod>} {<Id.Lit_Other '+'> <x>} {<helper>}) (C {<test_expect_success>} {(SQ <'setup '>)} { (SQ <'\n'> <'\techo "bin: test number 0" >zero.bin &&\n'> <'\techo "bin: test 1" >one.bin &&\n'> <'\techo "bin: test number 2" >two.bin &&\n'> <'\ttest_ln_s_add one.bin symlink.bin &&\n'> <'\tgit add . &&\n'> <'\tGIT_AUTHOR_NAME=Number1 git commit -a -m First --date="2010-01-01 18:00:00" &&\n'> <'\techo "bin: test 1 version 2" >one.bin &&\n'> <'\techo "bin: test number 2 version 2" >>two.bin &&\n'> <'\trm -f symlink.bin &&\n'> <'\ttest_ln_s_add two.bin symlink.bin &&\n'> <'\tGIT_AUTHOR_NAME=Number2 git commit -a -m Second --date="2010-01-01 20:00:00"\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc 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'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'no filter specified'>)} { (SQ <'\n'> <'\tgit blame one.bin >blame &&\n'> <'\tfind_blame Number2 <blame >result &&\n'> <'\ttest_cmp expected result\n'> ) } ) (C {<test_expect_success>} {(SQ <'setup textconv filters'>)} { (SQ <'\n'> <'\techo "*.bin diff=test" >.gitattributes &&\n'> <'\techo "zero.bin eol=crlf" >>.gitattributes &&\n'> <'\tgit config diff.test.textconv ./helper &&\n'> <'\tgit config diff.test.cachetextconv false\n'> ) } ) (C {<test_expect_success>} {(SQ <'blame with --no-textconv'>)} { (SQ <'\n'> <'\tgit blame --no-textconv one.bin >blame &&\n'> <'\tfind_blame <blame> result &&\n'> <'\ttest_cmp expected result\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc 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'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'basic blame on last commit'>)} { (SQ <'\n'> <'\tgit blame one.bin >blame &&\n'> <'\tfind_blame <blame >result &&\n'> <'\ttest_cmp expected result\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc 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'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'blame --textconv going through revisions'>)} { (SQ <'\n'> <'\tgit blame --textconv two.bin >blame &&\n'> <'\tfind_blame <blame >result &&\n'> <'\ttest_cmp expected result\n'> ) } ) (C {<test_expect_success>} {(SQ <'blame --textconv with local changes'>)} { (SQ <'\n'> <'\ttest_when_finished "git checkout zero.bin" &&\n'> <'\tprintf "bin: updated number 0\\015" >zero.bin &&\n'> <'\tgit blame --textconv zero.bin >blame &&\n'> <'\texpect="(Not Committed Yet ....-..-.. ..:..:.. +0000 1)" &&\n'> <'\texpect="$expect converted: updated number 0" &&\n'> <'\texpr "$(find_blame <blame)" : "^$expect"\n'> ) } ) (C {<test_expect_success>} {(SQ <'setup +cachetextconv'>)} {(SQ <'\n'> <'\tgit config diff.test.cachetextconv true\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected_one>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc 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'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'blame --textconv works with textconvcache'>)} { (SQ <'\n'> <'\tgit blame --textconv two.bin >blame &&\n'> <'\tfind_blame <blame >result &&\n'> <'\ttest_cmp expected result &&\n'> <'\tgit blame --textconv one.bin >blame &&\n'> <'\tfind_blame <blame >result &&\n'> <'\ttest_cmp expected_one result\n'> ) } ) (C {<test_expect_success>} {(SQ <'setup -cachetextconv'>)} {(SQ <'\n'> <'\tgit config diff.test.cachetextconv false\n'>)} ) (C {<test_expect_success>} {(SQ <'make a new commit'>)} { (SQ <'\n'> <'\techo "bin: test number 2 version 3" >>two.bin &&\n'> <'\tGIT_AUTHOR_NAME=Number3 git commit -a -m Third --date="2010-01-01 22:00:00"\n'> ) } ) (C {<test_expect_success>} {(SQ <'blame from previous revision'>)} { (SQ <'\n'> <'\tgit blame HEAD^ two.bin >blame &&\n'> <'\tfind_blame <blame >result &&\n'> <'\ttest_cmp expected result\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expected>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 291 stdin_parts: [<'(Number2 2010-01-01 20:00:00 +0000 1) two.bin\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {<SYMLINKS>} {(SQ <'blame with --no-textconv (on symlink)'>)} { (SQ <'\n'> <'\tgit blame --no-textconv symlink.bin >blame &&\n'> <'\tfind_blame <blame >result &&\n'> <'\ttest_cmp expected result\n'> ) } ) (C {<test_expect_success>} {<SYMLINKS>} {(SQ <'blame --textconv (on symlink)'>)} { (SQ <'\n'> <'\tgit blame --textconv symlink.bin >blame &&\n'> <'\tfind_blame <blame >result &&\n'> <'\ttest_cmp expected result\n'> ) } ) (C {<test_expect_success>} {(SQ <'make another new commit'>)} { (SQ <'\n'> <'\tcat >three.bin <<\\EOF &&\n'> <'bin: test number 2\n'> <'bin: test number 2 version 2\n'> <'bin: test number 2 version 3\n'> <'bin: test number 3\n'> <'EOF\n'> <'\tgit add three.bin &&\n'> <'\tGIT_AUTHOR_NAME=Number4 git commit -a -m Fourth --date="2010-01-01 23:00:00"\n'> ) } ) (C {<test_expect_success>} {(SQ <'blame on last commit (-C -C, symlink)'>)} { (SQ <'\n'> <'\tgit blame -C -C three.bin >blame &&\n'> <'\tfind_blame <blame >result &&\n'> <'\tcat >expected <<\\EOF &&\n'> <'(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'> <'(Number3 2010-01-01 22:00:00 +0000 3) converted: test number 2 version 3\n'> <'(Number4 2010-01-01 23:00:00 +0000 4) converted: test number 3\n'> <'EOF\n'> <'\ttest_cmp expected result\n'> ) } ) (C {<test_done>}) ] )