(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <'test textconv caching'>)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:16777215 arg_word:{(helper)} spids:[16]) (HereDoc op_id: Redir_DLess fd: 16777215 body: {('#!/bin/sh\n') ('sed \'s/^/converted: /\' "$@" >helper.out\n') ('cat helper.out\n')} do_expansion: False here_end: EOF was_filled: T spids: [19] ) ] ) (C {(chmod)} {(Lit_Other '+') (x)} {(helper)}) (C {(test_expect_success)} {(SQ <setup>)} { (SQ <'\n'> <'\techo foo content 1 >foo.bin &&\n'> <'\techo bar content 1 >bar.bin &&\n'> <'\tgit add . &&\n'> <'\tgit commit -m one &&\n'> <'\techo foo content 2 >foo.bin &&\n'> <'\techo bar content 2 >bar.bin &&\n'> <'\tgit commit -a -m two &&\n'> <'\techo "*.bin diff=magic" >.gitattributes &&\n'> <'\tgit config diff.magic.textconv ./helper &&\n'> <'\tgit config diff.magic.cachetextconv true\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect)} spids:[55]) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('diff --git a/bar.bin b/bar.bin\n') ('index fcf9166..28283d5 100644\n') ('--- a/bar.bin\n') ('+++ b/bar.bin\n') ('@@ -1 +1 @@\n') ('-converted: bar content 1\n') ('+converted: bar content 2\n') ('diff --git a/foo.bin b/foo.bin\n') ('index d5b9fe3..1345db2 100644\n') ('--- a/foo.bin\n') ('+++ b/foo.bin\n') ('@@ -1 +1 @@\n') ('-converted: foo content 1\n') ('+converted: foo content 2\n') ) } do_expansion: True here_end: EOF was_filled: T spids: [58] ) ] ) (C {(test_expect_success)} {(SQ <'first textconv works'>)} {(SQ <'\n'> <'\tgit diff HEAD^ HEAD >actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (C {(test_expect_success)} {(SQ <'cached textconv produces same output'>)} {(SQ <'\n'> <'\tgit diff HEAD^ HEAD >actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (C {(test_expect_success)} {(SQ <'cached textconv does not run helper'>)} { (SQ <'\n'> <'\trm -f helper.out &&\n'> <'\tgit diff HEAD^ HEAD >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\t! test -r helper.out\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect)} spids:[120]) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('diff --git a/bar.bin b/bar.bin\n') ('index fcf9166..28283d5 100644\n') ('--- a/bar.bin\n') ('+++ b/bar.bin\n') ('@@ -1,2 +1,2 @@\n') (' converted: other\n') ('-converted: bar content 1\n') ('+converted: bar content 2\n') ('diff --git a/foo.bin b/foo.bin\n') ('index d5b9fe3..1345db2 100644\n') ('--- a/foo.bin\n') ('+++ b/foo.bin\n') ('@@ -1,2 +1,2 @@\n') (' converted: other\n') ('-converted: foo content 1\n') ('+converted: foo content 2\n') ) } do_expansion: True here_end: EOF was_filled: T spids: [123] ) ] ) (C {(test_expect_success)} {(SQ <'changing textconv invalidates cache'>)} { (SQ <'\n'> <'\techo other >other &&\n'> <'\tgit config diff.magic.textconv "./helper other" &&\n'> <'\tgit diff HEAD^ HEAD >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:16777215 arg_word:{(expect)} spids:[160]) (HereDoc op_id: Redir_DLess fd: 16777215 body: { (DQ ('diff --git a/bar.bin b/bar.bin\n') ('index fcf9166..28283d5 100644\n') ('--- a/bar.bin\n') ('+++ b/bar.bin\n') ('@@ -1,2 +1,2 @@\n') (' converted: other\n') ('-converted: bar content 1\n') ('+converted: bar content 2\n') ('diff --git a/foo.bin b/foo.bin\n') ('index d5b9fe3..1345db2 100644\n') ('--- a/foo.bin\n') ('+++ b/foo.bin\n') ('@@ -1 +1 @@\n') ('-converted: foo content 1\n') ('+converted: foo content 2\n') ) } do_expansion: True here_end: EOF was_filled: T spids: [163] ) ] ) (C {(test_expect_success)} {(SQ <'switching diff driver produces correct results'>)} { (SQ <'\n'> <'\tgit config diff.moremagic.textconv ./helper &&\n'> <'\techo foo.bin diff=moremagic >>.gitattributes &&\n'> <'\tgit diff HEAD^ HEAD >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'log notes cache and still use cache for -p'>)} {(SQ <'\n'> <'\tgit log --no-walk -p refs/notes/textconv/magic HEAD\n'>)} ) (C {(test_done)}) ] )