(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'git rev-list --pretty=format test'>)} spids: [11] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (C {<.>} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) <'/lib-terminal.sh'>}) (C {<test_tick>}) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_encoding) op: assign_op.Equal rhs: {(DQ <ISO8859-1>)} spids: [34] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:added_utf8_part) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<printf>} {(DQ <Id.Lit_Other '\\'> <303> <Id.Lit_Other '\\'> <274>)}) ) } spids: [49] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:added_utf8_part_iso88591) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$added_utf8_part'))}) (C {<iconv>} {<-f>} {<utf-8>} {<-t>} {($ Id.VSub_DollarName '$test_encoding')}) ] negated: F ) ) } spids: [61] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:added) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<printf>} {(DQ <'added (hinzugef'> (${ Id.VSub_Name added_utf8_part) <'gt) foo'>)}) ) } spids: [82] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:added_iso88591) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$added'))}) (C {<iconv>} {<-f>} {<utf-8>} {<-t>} {($ Id.VSub_DollarName '$test_encoding')}) ] negated: F ) ) } spids: [95] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:changed_utf8_part) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<printf>} {(DQ <Id.Lit_Other '\\'> <303> <Id.Lit_Other '\\'> <244>)}) ) } spids: [119] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:changed_utf8_part_iso88591) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$changed_utf8_part'))}) (C {<iconv>} {<-f>} {<utf-8>} {<-t>} {($ Id.VSub_DollarName '$test_encoding')}) ] negated: F ) ) } spids: [131] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:changed) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (C {<printf>} {(DQ <'changed (ge'> (${ Id.VSub_Name changed_utf8_part) <'ndert) foo'>)} ) ) } spids: [152] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:changed_iso88591) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (C {<echo>} {(DQ ($ Id.VSub_DollarName '$changed'))}) (C {<iconv>} {<-f>} {<utf-8>} {<-t>} {($ Id.VSub_DollarName '$test_encoding')}) ] negated: F ) ) } spids: [165] ) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:truncate_count) op: assign_op.Equal rhs: {<20>} spids: [199] ) ] ) (C {<test_expect_success>} {(SQ <setup>)} { (SQ <'\n'> <'\t: >foo &&\n'> <'\tgit add foo &&\n'> <'\tgit config i18n.commitEncoding $test_encoding &&\n'> <'\techo "$added_iso88591" | git commit -F - &&\n'> <'\thead1=$(git rev-parse --verify HEAD) &&\n'> <'\thead1_short=$(git rev-parse --verify --short $head1) &&\n'> <'\ttree1=$(git rev-parse --verify HEAD:) &&\n'> <'\ttree1_short=$(git rev-parse --verify --short $tree1) &&\n'> <'\techo "$changed" > foo &&\n'> <'\techo "$changed_iso88591" | git commit -a -F - &&\n'> <'\thead2=$(git rev-parse --verify HEAD) &&\n'> <'\thead2_short=$(git rev-parse --verify --short $head2) &&\n'> <'\ttree2=$(git rev-parse --verify HEAD:) &&\n'> <'\ttree2_short=$(git rev-parse --verify --short $tree2) &&\n'> <'\tgit config --unset i18n.commitEncoding\n'> ) } ) (command.ShFunction name: test_format body: (BraceGroup children: [ (command.Simple words: [{<cat>}] redirects: [ (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<expect.> ($ Id.VSub_Number '$1')} ) ] do_fork: T ) (C {<test_expect_> (braced_var_sub token: <Id.VSub_Number 3> suffix_op: (suffix_op.Unary op_id:Id.VTest_ColonHyphen arg_word:{<success>}) ) } {(DQ <'format '> ($ Id.VSub_Number '$1'))} { (DQ <'\n'> <'\t\tgit rev-list --pretty=format:\''> ($ Id.VSub_Number '$2') <'\' master >output.'> ($ Id.VSub_Number '$1') <' &&\n'> <'\t\ttest_cmp expect.'> ($ Id.VSub_Number '$1') <' output.'> ($ Id.VSub_Number '$1') <'\n'> <'\t'> ) } ) ] ) ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:AUTO_COLOR) op: assign_op.Equal rhs: {(SQ <'%C(auto,red)foo%C(auto,reset)'>)} spids: [280] ) ] ) (command.ShFunction name: has_color body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{<printf>} {(SQ <'\\033[31mfoo\\033[m\\n'>)}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})] do_fork: T ) (C {<test_cmp>} {<expect>} {(DQ ($ Id.VSub_Number '$1'))}) ] ) ] ) ) (command.ShFunction name: has_no_color body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Simple words: [{<echo>} {<foo>}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})] do_fork: T ) (C {<test_cmp>} {<expect>} {(DQ ($ Id.VSub_Number '$1'))}) ] ) ] ) ) (command.Simple words: [{<test_format>} {<percent>} {<Id.Lit_Other '%'> <Id.Lit_Other '%'> <h>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 365 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'%h\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'%h\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<hash>} {<Id.Lit_Other '%'> <H> <Id.Lit_Other '%'> <n> <Id.Lit_Other '%'> <h>} ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 396 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> ($ Id.VSub_DollarName '$head2') <'\n'> ($ Id.VSub_DollarName '$head2_short') <'\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> ($ Id.VSub_DollarName '$head1') <'\n'> ($ Id.VSub_DollarName '$head1_short') <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<tree>} {<Id.Lit_Other '%'> <T> <Id.Lit_Other '%'> <n> <Id.Lit_Other '%'> <t>} ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 427 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> ($ Id.VSub_DollarName '$tree2') <'\n'> ($ Id.VSub_DollarName '$tree2_short') <'\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> ($ Id.VSub_DollarName '$tree1') <'\n'> ($ Id.VSub_DollarName '$tree1_short') <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<parents>} {<Id.Lit_Other '%'> <P> <Id.Lit_Other '%'> <n> <Id.Lit_Other '%'> <p>} ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 456 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> ($ Id.VSub_DollarName '$head1') <'\n'> ($ Id.VSub_DollarName '$head1_short') <'\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'\n'> <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<author>} {<Id.Lit_Other '%'> <an> <Id.Lit_Other '%'> <n> <Id.Lit_Other '%'> <ae> <Id.Lit_Other '%'> <n> <Id.Lit_Other '%'> <ad> <Id.Lit_Other '%'> <n> <Id.Lit_Other '%'> <aD> <Id.Lit_Other '%'> <n> <Id.Lit_Other '%'> <at> } ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 504 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'A U Thor\n'> <'author@example.com\n'> <'Thu Apr 7 15:13:13 2005 -0700\n'> <'Thu, 7 Apr 2005 15:13:13 -0700\n'> <'1112911993\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'A U Thor\n'> <'author@example.com\n'> <'Thu Apr 7 15:13:13 2005 -0700\n'> <'Thu, 7 Apr 2005 15:13:13 -0700\n'> <'1112911993\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<committer>} {<Id.Lit_Other '%'> <cn> <Id.Lit_Other '%'> <n> <Id.Lit_Other '%'> <ce> <Id.Lit_Other '%'> <n> <Id.Lit_Other '%'> <cd> <Id.Lit_Other '%'> <n> <Id.Lit_Other '%'> <cD> <Id.Lit_Other '%'> <n> <Id.Lit_Other '%'> <ct> } ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 549 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'C O Mitter\n'> <'committer@example.com\n'> <'Thu Apr 7 15:13:13 2005 -0700\n'> <'Thu, 7 Apr 2005 15:13:13 -0700\n'> <'1112911993\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'C O Mitter\n'> <'committer@example.com\n'> <'Thu Apr 7 15:13:13 2005 -0700\n'> <'Thu, 7 Apr 2005 15:13:13 -0700\n'> <'1112911993\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_format>} {<encoding>} {<Id.Lit_Other '%'> <e>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 572 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> ($ Id.VSub_DollarName '$test_encoding') <'\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> ($ Id.VSub_DollarName '$test_encoding') <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_format>} {<subject>} {<Id.Lit_Other '%'> <s>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 595 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> ($ Id.VSub_DollarName '$changed') <'\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> ($ Id.VSub_DollarName '$added') <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<subject-truncated>} {(DQ <'%<('> ($ Id.VSub_DollarName '$truncate_count') <',trunc)%s'>)} ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 627 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'changed (ge'> (${ Id.VSub_Name changed_utf8_part) <'ndert)..\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'added (hinzugef'> (${ Id.VSub_Name added_utf8_part) <'gt..\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_format>} {<body>} {<Id.Lit_Other '%'> <b>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 646 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_format>} {<raw-body>} {<Id.Lit_Other '%'> <B>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 671 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> ($ Id.VSub_DollarName '$changed') <'\n'> <'\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> ($ Id.VSub_DollarName '$added') <'\n'> <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<colors>} {<Id.Lit_Other '%'> <Credfoo> <Id.Lit_Other '%'> <Cgreenbar> <Id.Lit_Other '%'> <Cbluebaz> <Id.Lit_Other '%'> <Cresetxyzzy> } ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 698 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'\x1b[31mfoo\x1b[32mbar\x1b[34mbaz\x1b[mxyzzy\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'\x1b[31mfoo\x1b[32mbar\x1b[34mbaz\x1b[mxyzzy\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_format>} {<advanced-colors>} {(SQ <'%C(red yellow bold)foo%C(reset)'>)}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 720 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'\x1b[1;31;43mfoo\x1b[m\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'\x1b[1;31;43mfoo\x1b[m\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'%C(auto,...) does not enable color by default'>)} {(SQ <'\n'> <'\tgit log --format=$AUTO_COLOR -1 >actual &&\n'> <'\thas_no_color actual\n'>)} ) (C {<test_expect_success>} {(SQ <'%C(auto,...) enables colors for color.diff'>)} { (SQ <'\n'> <'\tgit -c color.diff=always log --format=$AUTO_COLOR -1 >actual &&\n'> <'\thas_color actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'%C(auto,...) enables colors for color.ui'>)} { (SQ <'\n'> <'\tgit -c color.ui=always log --format=$AUTO_COLOR -1 >actual &&\n'> <'\thas_color actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'%C(auto,...) respects --color'>)} { (SQ <'\n'> <'\tgit log --format=$AUTO_COLOR -1 --color >actual &&\n'> <'\thas_color actual\n'>) } ) (C {<test_expect_success>} {(SQ <'%C(auto,...) respects --no-color'>)} { (SQ <'\n'> <'\tgit -c color.ui=always log --format=$AUTO_COLOR -1 --no-color >actual &&\n'> <'\thas_no_color actual\n'> ) } ) (C {<test_expect_success>} {<TTY>} {(SQ <'%C(auto,...) respects --color=auto (stdout is tty)'>)} { (SQ <'\n'> <'\ttest_terminal env TERM=vt100 \\\n'> <'\t\tgit log --format=$AUTO_COLOR -1 --color=auto >actual &&\n'> <'\thas_color actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'%C(auto,...) respects --color=auto (stdout not tty)'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tTERM=vt100 && export TERM &&\n'> <'\t\tgit log --format=$AUTO_COLOR -1 --color=auto >actual &&\n'> <'\t\thas_no_color actual\n'> <'\t)\n'> ) } ) (C {<test_expect_success>} {(SQ <'%C(auto) respects --color'>)} { (SQ <'\n'> <'\tgit log --color --format="%C(auto)%H" -1 >actual &&\n'> <'\tprintf "\\\\033[33m%s\\\\033[m\\\\n" $(git rev-parse HEAD) >expect &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'%C(auto) respects --no-color'>)} { (SQ <'\n'> <'\tgit log --no-color --format="%C(auto)%H" -1 >actual &&\n'> <'\tgit rev-parse HEAD >expect &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<iconv>} {<-f>} {<utf-8>} {<-t>} {($ Id.VSub_DollarName '$test_encoding')}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<commit-msg>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 872 stdin_parts: [ <'Test printing of complex bodies\n'> <'\n'> <'This commit message is much longer than the others,\n'> <'and it will be encoded in '> ($ Id.VSub_DollarName '$test_encoding') <'. We should therefore\n'> <'include an ISO8859 character: ¡bueno!\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'setup complex body'>)} { (SQ <'\n'> <'\tgit config i18n.commitencoding $test_encoding &&\n'> <'\techo change2 >foo && git commit -a -F commit-msg &&\n'> <'\thead3=$(git rev-parse --verify HEAD) &&\n'> <'\thead3_short=$(git rev-parse --short $head3)\n'> ) } ) (command.Simple words: [{<test_format>} {<complex-encoding>} {<Id.Lit_Other '%'> <e>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 915 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head3') <'\n'> ($ Id.VSub_DollarName '$test_encoding') <'\n'> <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> ($ Id.VSub_DollarName '$test_encoding') <'\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> ($ Id.VSub_DollarName '$test_encoding') <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_format>} {<complex-subject>} {<Id.Lit_Other '%'> <s>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 942 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head3') <'\n'> <'Test printing of complex bodies\n'> <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> ($ Id.VSub_DollarName '$changed_iso88591') <'\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> ($ Id.VSub_DollarName '$added_iso88591') <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<complex-subject-trunc>} {(DQ <'%<('> ($ Id.VSub_DollarName '$truncate_count') <',trunc)%s'>)} ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 978 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head3') <'\n'> <'Test printing of c..\n'> <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'changed (ge'> (${ Id.VSub_Name changed_utf8_part_iso88591) <'ndert)..\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'added (hinzugef'> (${ Id.VSub_Name added_utf8_part_iso88591) <'gt..\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<complex-subject-mtrunc>} {(DQ <'%<('> ($ Id.VSub_DollarName '$truncate_count') <',mtrunc)%s'>)} ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 1010 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head3') <'\n'> <'Test prin..ex bodies\n'> <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'changed (..dert) foo\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'added (hi..f'> (${ Id.VSub_Name added_utf8_part_iso88591) <'gt) foo\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<complex-subject-ltrunc>} {(DQ <'%<('> ($ Id.VSub_DollarName '$truncate_count') <',ltrunc)%s'>)} ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 1046 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head3') <'\n'> <'.. of complex bodies\n'> <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'..ged (ge'> (${ Id.VSub_Name changed_utf8_part_iso88591) <'ndert) foo\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'.. (hinzugef'> (${ Id.VSub_Name added_utf8_part_iso88591) <'gt) foo\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'prepare expected messages (for test %b)'>)} { (SQ <'\n'> <'\tcat <<-EOF >expected.utf-8 &&\n'> <'\tcommit $head3\n'> <'\tThis commit message is much longer than the others,\n'> <'\tand it will be encoded in $test_encoding. We should therefore\n'> <'\tinclude an ISO8859 character: ¡bueno!\n'> <'\n'> <'\tcommit $head2\n'> <'\tcommit $head1\n'> <'\tEOF\n'> <'\ticonv -f utf-8 -t $test_encoding expected.utf-8 >expected.ISO8859-1\n'> ) } ) (command.Simple words: [{<test_format>} {<complex-body>} {<Id.Lit_Other '%'> <b>}] redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<expected.ISO8859-1>})] do_fork: T ) (C {<git>} {<config>} {<--unset>} {<i18n.commitEncoding>}) (command.Simple words: [{<test_format>} {<complex-subject-commitencoding-unset>} {<Id.Lit_Other '%'> <s>}] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 1120 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head3') <'\n'> <'Test printing of complex bodies\n'> <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> ($ Id.VSub_DollarName '$changed') <'\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> ($ Id.VSub_DollarName '$added') <'\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<complex-subject-commitencoding-unset-trunc>} {(DQ <'%<('> ($ Id.VSub_DollarName '$truncate_count') <',trunc)%s'>)} ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 1156 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head3') <'\n'> <'Test printing of c..\n'> <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'changed (ge'> (${ Id.VSub_Name changed_utf8_part) <'ndert)..\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'added (hinzugef'> (${ Id.VSub_Name added_utf8_part) <'gt..\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<complex-subject-commitencoding-unset-mtrunc>} {(DQ <'%<('> ($ Id.VSub_DollarName '$truncate_count') <',mtrunc)%s'>)} ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 1188 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head3') <'\n'> <'Test prin..ex bodies\n'> <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'changed (..dert) foo\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'added (hi..f'> (${ Id.VSub_Name added_utf8_part) <'gt) foo\n'> ] ) ) ] do_fork: T ) (command.Simple words: [ {<test_format>} {<complex-subject-commitencoding-unset-ltrunc>} {(DQ <'%<('> ($ Id.VSub_DollarName '$truncate_count') <',ltrunc)%s'>)} ] redirects: [ (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.MultiLine here_begin: {<EOF>} here_end_span_id: 1224 stdin_parts: [ <'commit '> ($ Id.VSub_DollarName '$head3') <'\n'> <'.. of complex bodies\n'> <'commit '> ($ Id.VSub_DollarName '$head2') <'\n'> <'..ged (ge'> (${ Id.VSub_Name changed_utf8_part) <'ndert) foo\n'> <'commit '> ($ Id.VSub_DollarName '$head1') <'\n'> <'.. (hinzugef'> (${ Id.VSub_Name added_utf8_part) <'gt) foo\n'> ] ) ) ] do_fork: T ) (command.Simple words: [{<test_format>} {<complex-body-commitencoding-unset>} {<Id.Lit_Other '%'> <b>}] redirects: [(redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<expected.utf-8>})] do_fork: T ) (C {<test_expect_success>} {(SQ <'%x00 shows NUL'>)} { (SQ <'\n'> <'\techo >expect commit $head3 &&\n'> <'\techo >>expect fooQbar &&\n'> <'\tgit rev-list -1 --format=foo%x00bar HEAD >actual.nul &&\n'> <'\tnul_to_q <actual.nul >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'%ad respects --date='>)} { (SQ <'\n'> <'\techo 2005-04-07 >expect.ad-short &&\n'> <'\tgit log -1 --date=short --pretty=tformat:%ad >output.ad-short master &&\n'> <'\ttest_cmp expect.ad-short output.ad-short\n'> ) } ) (C {<test_expect_success>} {(SQ <'empty email'>)} { (SQ <'\n'> <'\ttest_tick &&\n'> <'\tC=$(GIT_AUTHOR_EMAIL= git commit-tree HEAD^{tree} </dev/null) &&\n'> <'\tA=$(git show --pretty=format:%an,%ae,%ad%n -s $C) &&\n'> <'\tverbose test "$A" = "A U Thor,,Thu Apr 7 15:14:13 2005 -0700"\n'> ) } ) (C {<test_expect_success>} {(SQ <'del LF before empty (1)'>)} { (SQ <'\n'> <'\tgit show -s --pretty=format:"%s%n%-b%nThanks%n" HEAD^^ >actual &&\n'> <'\ttest_line_count = 2 actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'del LF before empty (2)'>)} { (SQ <'\n'> <'\tgit show -s --pretty=format:"%s%n%-b%nThanks%n" HEAD >actual &&\n'> <'\ttest_line_count = 6 actual &&\n'> <'\tgrep "^$" actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'add LF before non-empty (1)'>)} { (SQ <'\n'> <'\tgit show -s --pretty=format:"%s%+b%nThanks%n" HEAD^^ >actual &&\n'> <'\ttest_line_count = 2 actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'add LF before non-empty (2)'>)} { (SQ <'\n'> <'\tgit show -s --pretty=format:"%s%+b%nThanks%n" HEAD >actual &&\n'> <'\ttest_line_count = 6 actual &&\n'> <'\tgrep "^$" actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'add SP before non-empty (1)'>)} { (SQ <'\n'> <'\tgit show -s --pretty=format:"%s% bThanks" HEAD^^ >actual &&\n'> <'\ttest $(wc -w <actual) = 3\n'> ) } ) (C {<test_expect_success>} {(SQ <'add SP before non-empty (2)'>)} { (SQ <'\n'> <'\tgit show -s --pretty=format:"%s% sThanks" HEAD^^ >actual &&\n'> <'\ttest $(wc -w <actual) = 6\n'> ) } ) (C {<test_expect_success>} {(SQ <--abbrev>)} { (SQ <'\n'> <'\techo SHORT SHORT SHORT >expect2 &&\n'> <'\techo LONG LONG LONG >expect3 &&\n'> <'\tgit log -1 --format="%h %h %h" HEAD >actual1 &&\n'> <'\tgit log -1 --abbrev=5 --format="%h %h %h" HEAD >actual2 &&\n'> <'\tgit log -1 --abbrev=5 --format="%H %H %H" HEAD >actual3 &&\n'> <'\tsed -e "s/$_x40/LONG/g" -e "s/$_x05/SHORT/g" <actual2 >fuzzy2 &&\n'> <'\tsed -e "s/$_x40/LONG/g" -e "s/$_x05/SHORT/g" <actual3 >fuzzy3 &&\n'> <'\ttest_cmp expect2 fuzzy2 &&\n'> <'\ttest_cmp expect3 fuzzy3 &&\n'> <'\t! test_cmp actual1 actual2\n'> ) } ) (C {<test_expect_success>} {(SQ <'%H is not affected by --abbrev-commit'>)} { (SQ <'\n'> <'\tgit log -1 --format=%H --abbrev-commit --abbrev=20 HEAD >actual &&\n'> <'\tlen=$(wc -c <actual) &&\n'> <'\ttest $len = 41\n'> ) } ) (C {<test_expect_success>} {(SQ <'%h is not affected by --abbrev-commit'>)} { (SQ <'\n'> <'\tgit log -1 --format=%h --abbrev-commit --abbrev=20 HEAD >actual &&\n'> <'\tlen=$(wc -c <actual) &&\n'> <'\ttest $len = 21\n'> ) } ) (C {<test_expect_success>} {(SQ <'"%h %gD: %gs" is same as git-reflog'>)} { (SQ <'\n'> <'\tgit reflog >expect &&\n'> <'\tgit log -g --format="%h %gD: %gs" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'"%h %gD: %gs" is same as git-reflog (with date)'>)} { (SQ <'\n'> <'\tgit reflog --date=raw >expect &&\n'> <'\tgit log -g --format="%h %gD: %gs" --date=raw >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'"%h %gD: %gs" is same as git-reflog (with --abbrev)'>)} { (SQ <'\n'> <'\tgit reflog --abbrev=13 --date=raw >expect &&\n'> <'\tgit log -g --abbrev=13 --format="%h %gD: %gs" --date=raw >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'%gd shortens ref name'>)} { (SQ <'\n'> <'\techo "master@{0}" >expect.gd-short &&\n'> <'\tgit log -g -1 --format=%gd refs/heads/master >actual.gd-short &&\n'> <'\ttest_cmp expect.gd-short actual.gd-short\n'> ) } ) (C {<test_expect_success>} {(SQ <'reflog identity'>)} { (SQ <'\n'> <'\techo "C O Mitter:committer@example.com" >expect &&\n'> <'\tgit log -g -1 --format="%gn:%ge" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'oneline with empty message'>)} { (SQ <'\n'> <'\tgit commit -m "dummy" --allow-empty &&\n'> <'\tgit commit -m "dummy" --allow-empty &&\n'> <'\tgit filter-branch --msg-filter "sed -e s/dummy//" HEAD^^.. &&\n'> <'\tgit rev-list --oneline HEAD >test.txt &&\n'> <'\ttest_line_count = 5 test.txt &&\n'> <'\tgit rev-list --oneline --graph HEAD >testg.txt &&\n'> <'\ttest_line_count = 5 testg.txt\n'> ) } ) (C {<test_expect_success>} {(SQ <'single-character name is parsed correctly'>)} { (SQ <'\n'> <'\tgit commit --author="a <a@example.com>" --allow-empty -m foo &&\n'> <'\techo "a <a@example.com>" >expect &&\n'> <'\tgit log -1 --format="%an <%ae>" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'unused %G placeholders are passed through'>)} { (SQ <'\n'> <'\techo "%GX %G" >expect &&\n'> <'\tgit log -1 --format="%GX %G" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_done>}) ] )