(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'git log'>)} spids: [4] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (C {<.>} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY') <'/lib-gpg.sh'>)}) (C {<test_expect_success>} {<setup>} { (SQ <'\n'> <'\n'> <'\techo one >one &&\n'> <'\tgit add one &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m initial &&\n'> <'\n'> <'\techo ichi >one &&\n'> <'\tgit add one &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m second &&\n'> <'\n'> <'\tgit mv one ichi &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m third &&\n'> <'\n'> <'\tcp ichi ein &&\n'> <'\tgit add ein &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m fourth &&\n'> <'\n'> <'\tmkdir a &&\n'> <'\techo ni >a/two &&\n'> <'\tgit add a/two &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m fifth &&\n'> <'\n'> <'\tgit rm a/two &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m sixth\n'> <'\n'> ) } ) (command.Simple words: [ {<printf>} { (DQ <sixth> <Id.Lit_BadBackslash '\\'> <nfifth> <Id.Lit_BadBackslash '\\'> <nfourth> <Id.Lit_BadBackslash '\\'> <nthird> <Id.Lit_BadBackslash '\\'> <nsecond> <Id.Lit_BadBackslash '\\'> <ninitial> ) } ] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})] do_fork: T ) (C {<test_expect_success>} {(SQ <pretty>)} { (SQ <'\n'> <'\n'> <'\tgit log --pretty="format:%s" > actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [ {<printf>} { (DQ <sixth> <Id.Lit_BadBackslash '\\'> <nfifth> <Id.Lit_BadBackslash '\\'> <nfourth> <Id.Lit_BadBackslash '\\'> <nthird> <Id.Lit_BadBackslash '\\'> <nsecond> <Id.Lit_BadBackslash '\\'> <ninitial> <Id.Lit_BadBackslash '\\'> <n> ) } ] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>})] do_fork: T ) (C {<test_expect_success>} {(SQ <'pretty (tformat)'>)} { (SQ <'\n'> <'\n'> <'\tgit log --pretty="tformat:%s" > actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'pretty (shortcut)'>)} {(SQ <'\n'> <'\n'> <'\tgit log --pretty="%s" > actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (C {<test_expect_success>} {(SQ <format>)} {(SQ <'\n'> <'\n'> <'\tgit log --format="%s" > actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 176 stdin_parts: [ <' This is\n'> <' the sixth\n'> <' commit.\n'> <' This is\n'> <' the fifth\n'> <' commit.\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'format %w(11,1,2)'>)} { (SQ <'\n'> <'\n'> <'\tgit log -2 --format="%w(11,1,2)This is the %s commit." > actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'format %w(,1,2)'>)} { (SQ <'\n'> <'\n'> <'\tgit log -2 --format="%w(,1,2)This is%nthe %s%ncommit." > actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (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: [ <'804a787 sixth\n'> <'394ef78 fifth\n'> <'5d31159 fourth\n'> <'2fbe8c0 third\n'> <'f7dab8e second\n'> <'3a2fdcb initial\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <oneline>)} {(SQ <'\n'> <'\n'> <'\tgit log --oneline > actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (C {<test_expect_success>} {(SQ <'diff-filter=A'>)} { (SQ <'\n'> <'\n'> <'\tgit log --no-renames --pretty="format:%s" --diff-filter=A HEAD > actual &&\n'> <'\tgit log --no-renames --pretty="format:%s" --diff-filter A HEAD > actual-separate &&\n'> <'\tprintf "fifth\\nfourth\\nthird\\ninitial" > expect &&\n'> <'\ttest_cmp expect actual &&\n'> <'\ttest_cmp expect actual-separate\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'diff-filter=M'>)} { (SQ <'\n'> <'\n'> <'\tactual=$(git log --pretty="format:%s" --diff-filter=M HEAD) &&\n'> <'\texpect=$(echo second) &&\n'> <'\tverbose test "$actual" = "$expect"\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'diff-filter=D'>)} { (SQ <'\n'> <'\n'> <'\tactual=$(git log --no-renames --pretty="format:%s" --diff-filter=D HEAD) &&\n'> <'\texpect=$(echo sixth ; echo third) &&\n'> <'\tverbose test "$actual" = "$expect"\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'diff-filter=R'>)} { (SQ <'\n'> <'\n'> <'\tactual=$(git log -M --pretty="format:%s" --diff-filter=R HEAD) &&\n'> <'\texpect=$(echo third) &&\n'> <'\tverbose test "$actual" = "$expect"\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'diff-filter=C'>)} { (SQ <'\n'> <'\n'> <'\tactual=$(git log -C -C --pretty="format:%s" --diff-filter=C HEAD) &&\n'> <'\texpect=$(echo fourth) &&\n'> <'\tverbose test "$actual" = "$expect"\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'git log --follow'>)} { (SQ <'\n'> <'\n'> <'\tactual=$(git log --follow --pretty="format:%s" ichi) &&\n'> <'\texpect=$(echo third ; echo second ; echo initial) &&\n'> <'\tverbose test "$actual" = "$expect"\n'> ) } ) (C {<test_expect_success>} {(SQ <'git config log.follow works like --follow'>)} { (SQ <'\n'> <'\ttest_config log.follow true &&\n'> <'\tactual=$(git log --pretty="format:%s" ichi) &&\n'> <'\texpect=$(echo third ; echo second ; echo initial) &&\n'> <'\tverbose test "$actual" = "$expect"\n'> ) } ) (C {<test_expect_success>} {(SQ <'git config log.follow does not die with multiple paths'>)} { (SQ <'\n'> <'\ttest_config log.follow true &&\n'> <'\tgit log --pretty="format:%s" ichi ein\n'>) } ) (C {<test_expect_success>} {(SQ <'git config log.follow does not die with no paths'>)} {(SQ <'\n'> <'\ttest_config log.follow true &&\n'> <'\tgit log --\n'>)} ) (C {<test_expect_success>} {(SQ <'git config log.follow is overridden by --no-follow'>)} { (SQ <'\n'> <'\ttest_config log.follow true &&\n'> <'\tactual=$(git log --no-follow --pretty="format:%s" ichi) &&\n'> <'\texpect="third" &&\n'> <'\tverbose test "$actual" = "$expect"\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 405 stdin_parts: [<'804a787 sixth\n'> <'394ef78 fifth\n'> <'5d31159 fourth\n'>] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'git log --no-walk <commits> sorts by commit time'>)} { (SQ <'\n'> <'\tgit log --no-walk --oneline 5d31159 804a787 394ef78 > actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'git log --no-walk=sorted <commits> sorts by commit time'>)} { (SQ <'\n'> <'\tgit log --no-walk=sorted --oneline 5d31159 804a787 394ef78 > actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 446 stdin_parts: [<'=== 804a787 sixth\n'> <'=== 394ef78 fifth\n'> <'=== 5d31159 fourth\n'>] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'git log --line-prefix="=== " --no-walk <commits> sorts by commit time'>)} { (SQ <'\n'> < '\tgit log --line-prefix="=== " --no-walk --oneline 5d31159 804a787 394ef78 > actual &&\n' > <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 474 stdin_parts: [<'5d31159 fourth\n'> <'804a787 sixth\n'> <'394ef78 fifth\n'>] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'git log --no-walk=unsorted <commits> leaves list of commits as given'>)} { (SQ <'\n'> <'\tgit log --no-walk=unsorted --oneline 5d31159 804a787 394ef78 > actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'git show <commits> leaves list of commits as given'>)} { (SQ <'\n'> <'\tgit show --oneline -s 5d31159 804a787 394ef78 > actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'setup case sensitivity tests'>)} { (SQ <'\n'> <'\techo case >one &&\n'> <'\ttest_tick &&\n'> <'\tgit add one &&\n'> <'\tgit commit -a -m Second\n'> ) } ) (C {<test_expect_success>} {(SQ <'log --grep'>)} { (SQ <'\n'> <'\techo second >expect &&\n'> <'\tgit log -1 --pretty="tformat:%s" --grep=sec >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 543 stdin_parts: [<'second\n'> <'initial\n'>] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'log --invert-grep --grep'>)} { (SQ <'\n'> <'\tgit log --pretty="tformat:%s" --invert-grep --grep=th --grep=Sec >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'log --invert-grep --grep -i'>)} { (SQ <'\n'> <'\techo initial >expect &&\n'> <'\tgit log --pretty="tformat:%s" --invert-grep -i --grep=th --grep=Sec >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'log --grep option parsing'>)} { (SQ <'\n'> <'\techo second >expect &&\n'> <'\tgit log -1 --pretty="tformat:%s" --grep sec >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\ttest_must_fail git log -1 --pretty="tformat:%s" --grep\n'> ) } ) (C {<test_expect_success>} {(SQ <'log -i --grep'>)} { (SQ <'\n'> <'\techo Second >expect &&\n'> <'\tgit log -1 --pretty="tformat:%s" -i --grep=sec >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'log --grep -i'>)} { (SQ <'\n'> <'\techo Second >expect &&\n'> <'\tgit log -1 --pretty="tformat:%s" --grep=sec -i >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'log -F -E --grep=<ere> uses ere'>)} { (SQ <'\n'> <'\techo second >expect &&\n'> <'\tgit log -1 --pretty="tformat:%s" -F -E --grep=s.c.nd >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'log with grep.patternType configuration'>)} { (SQ <'\n'> <'\t>expect &&\n'> <'\tgit -c grep.patterntype=fixed \\\n'> <'\tlog -1 --pretty=tformat:%s --grep=s.c.nd >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'log with grep.patternType configuration and command line'>)} { (SQ <'\n'> <'\techo second >expect &&\n'> <'\tgit -c grep.patterntype=fixed \\\n'> <'\tlog -1 --pretty=tformat:%s --basic-regexp --grep=s.c.nd >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 675 stdin_parts: [ <'* Second\n'> <'* sixth\n'> <'* fifth\n'> <'* fourth\n'> <'* third\n'> <'* second\n'> <'* initial\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'simple log --graph'>)} { (SQ <'\n'> <'\tgit log --graph --pretty=tformat:%s >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 707 stdin_parts: [ <'123 * Second\n'> <'123 * sixth\n'> <'123 * fifth\n'> <'123 * fourth\n'> <'123 * third\n'> <'123 * second\n'> <'123 * initial\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'simple log --graph --line-prefix="123 "'>)} { (SQ <'\n'> <'\tgit log --graph --line-prefix="123 " --pretty=tformat:%s >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'set up merge history'>)} { (SQ <'\n'> <'\tgit checkout -b side HEAD~4 &&\n'> <'\ttest_commit side-1 1 1 &&\n'> <'\ttest_commit side-2 2 2 &&\n'> <'\tgit checkout master &&\n'> <'\tgit merge side\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'>) <OF>} here_end_span_id: 760 stdin_parts: [ <'* Merge branch \'side\'\n'> <'|\\\n'> <'| * side-2\n'> <'| * side-1\n'> <'* | Second\n'> <'* | sixth\n'> <'* | fifth\n'> <'* | fourth\n'> <'|/\n'> <'* third\n'> <'* second\n'> <'* initial\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'log --graph with merge'>)} { (SQ <'\n'> <'\tgit log --graph --date-order --pretty=tformat:%s |\n'> <'\t\tsed "s/ *\\$//" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'>) <OF>} here_end_span_id: 798 stdin_parts: [ <'| | | * Merge branch \'side\'\n'> <'| | | |\\\n'> <'| | | | * side-2\n'> <'| | | | * side-1\n'> <'| | | * | Second\n'> <'| | | * | sixth\n'> <'| | | * | fifth\n'> <'| | | * | fourth\n'> <'| | | |/\n'> <'| | | * third\n'> <'| | | * second\n'> <'| | | * initial\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'log --graph --line-prefix="| | | " with merge'>)} { (SQ <'\n'> <'\tgit log --line-prefix="| | | " --graph --date-order --pretty=tformat:%s |\n'> <'\t\tsed "s/ *\\$//" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'log --raw --graph -m with merge'>)} { (SQ <'\n'> <'\tgit log --raw --graph --oneline -m master | head -n 500 >actual &&\n'> <'\tgrep "initial" actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'diff-tree --graph'>)} { (SQ <'\n'> <'\tgit diff-tree --graph master^ | head -n 500 >actual &&\n'> <'\tgrep "one" actual\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'>) <OF>} here_end_span_id: 900 stdin_parts: [ <'* commit master\n'> <'|\\ Merge: A B\n'> <'| | Author: A U Thor <author@example.com>\n'> <'| |\n'> <'| | Merge branch \'side\'\n'> <'| |\n'> <'| * commit side\n'> <'| | Author: A U Thor <author@example.com>\n'> <'| |\n'> <'| | side-2\n'> <'| |\n'> <'| * commit tags/side-1\n'> <'| | Author: A U Thor <author@example.com>\n'> <'| |\n'> <'| | side-1\n'> <'| |\n'> <'* | commit master~1\n'> <'| | Author: A U Thor <author@example.com>\n'> <'| |\n'> <'| | Second\n'> <'| |\n'> <'* | commit master~2\n'> <'| | Author: A U Thor <author@example.com>\n'> <'| |\n'> <'| | sixth\n'> <'| |\n'> <'* | commit master~3\n'> <'| | Author: A U Thor <author@example.com>\n'> <'| |\n'> <'| | fifth\n'> <'| |\n'> <'* | commit master~4\n'> <'|/ Author: A U Thor <author@example.com>\n'> <'|\n'> <'| fourth\n'> <'|\n'> <'* commit tags/side-1~1\n'> <'| Author: A U Thor <author@example.com>\n'> <'|\n'> <'| third\n'> <'|\n'> <'* commit tags/side-1~2\n'> <'| Author: A U Thor <author@example.com>\n'> <'|\n'> <'| second\n'> <'|\n'> <'* commit tags/side-1~3\n'> <' Author: A U Thor <author@example.com>\n'> <'\n'> <' initial\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'log --graph with full output'>)} { (SQ <'\n'> <'\tgit log --graph --date-order --pretty=short |\n'> <'\t\tgit name-rev --name-only --stdin |\n'> <'\t\tsed "s/Merge:.*/Merge: A B/;s/ *\\$//" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'set up more tangled history'>)} { (SQ <'\n'> <'\tgit checkout -b tangle HEAD~6 &&\n'> <'\ttest_commit tangle-a tangle-a a &&\n'> <'\tgit merge master~3 &&\n'> <'\tgit merge side~1 &&\n'> <'\tgit checkout master &&\n'> <'\tgit merge tangle &&\n'> <'\tgit checkout -b reach &&\n'> <'\ttest_commit reach &&\n'> <'\tgit checkout master &&\n'> <'\tgit checkout -b octopus-a &&\n'> <'\ttest_commit octopus-a &&\n'> <'\tgit checkout master &&\n'> <'\tgit checkout -b octopus-b &&\n'> <'\ttest_commit octopus-b &&\n'> <'\tgit checkout master &&\n'> <'\ttest_commit seventh &&\n'> <'\tgit merge octopus-a octopus-b &&\n'> <'\tgit merge reach\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'>) <OF>} here_end_span_id: 994 stdin_parts: [ <'* Merge tag \'reach\'\n'> <'|\\\n'> <'| \\\n'> <'| \\\n'> <'*-. \\ Merge tags \'octopus-a\' and \'octopus-b\'\n'> <'|\\ \\ \\\n'> <'* | | | seventh\n'> <'| | * | octopus-b\n'> <'| |/ /\n'> <'|/| |\n'> <'| * | octopus-a\n'> <'|/ /\n'> <'| * reach\n'> <'|/\n'> <'* Merge branch \'tangle\'\n'> <'|\\\n'> <'| * Merge branch \'side\' (early part) into tangle\n'> <'| |\\\n'> <'| * \\ Merge branch \'master\' (early part) into tangle\n'> <'| |\\ \\\n'> <'| * | | tangle-a\n'> <'* | | | Merge branch \'side\'\n'> <'|\\ \\ \\ \\\n'> <'| * | | | side-2\n'> <'| | |_|/\n'> <'| |/| |\n'> <'| * | | side-1\n'> <'* | | | Second\n'> <'* | | | sixth\n'> <'| |_|/\n'> <'|/| |\n'> <'* | | fifth\n'> <'* | | fourth\n'> <'|/ /\n'> <'* | third\n'> <'|/\n'> <'* second\n'> <'* initial\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'log --graph with merge'>)} { (SQ <'\n'> <'\tgit log --graph --date-order --pretty=tformat:%s |\n'> <'\t\tsed "s/ *\\$//" >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'log.decorate configuration'>)} { (SQ <'\n'> <'\tgit log --oneline >expect.none &&\n'> <'\tgit log --oneline --decorate >expect.short &&\n'> <'\tgit log --oneline --decorate=full >expect.full &&\n'> <'\n'> <'\techo "[log] decorate" >>.git/config &&\n'> <'\tgit log --oneline >actual &&\n'> <'\ttest_cmp expect.short actual &&\n'> <'\n'> <'\ttest_config log.decorate true &&\n'> <'\tgit log --oneline >actual &&\n'> <'\ttest_cmp expect.short actual &&\n'> <'\tgit log --oneline --decorate=full >actual &&\n'> <'\ttest_cmp expect.full actual &&\n'> <'\tgit log --oneline --decorate=no >actual &&\n'> <'\ttest_cmp expect.none actual &&\n'> <'\n'> <'\ttest_config log.decorate no &&\n'> <'\tgit log --oneline >actual &&\n'> <'\ttest_cmp expect.none actual &&\n'> <'\tgit log --oneline --decorate >actual &&\n'> <'\ttest_cmp expect.short actual &&\n'> <'\tgit log --oneline --decorate=full >actual &&\n'> <'\ttest_cmp expect.full actual &&\n'> <'\n'> <'\ttest_config log.decorate 1 &&\n'> <'\tgit log --oneline >actual &&\n'> <'\ttest_cmp expect.short actual &&\n'> <'\tgit log --oneline --decorate=full >actual &&\n'> <'\ttest_cmp expect.full actual &&\n'> <'\tgit log --oneline --decorate=no >actual &&\n'> <'\ttest_cmp expect.none actual &&\n'> <'\n'> <'\ttest_config log.decorate short &&\n'> <'\tgit log --oneline >actual &&\n'> <'\ttest_cmp expect.short actual &&\n'> <'\tgit log --oneline --no-decorate >actual &&\n'> <'\ttest_cmp expect.none actual &&\n'> <'\tgit log --oneline --decorate=full >actual &&\n'> <'\ttest_cmp expect.full actual &&\n'> <'\n'> <'\ttest_config log.decorate full &&\n'> <'\tgit log --oneline >actual &&\n'> <'\ttest_cmp expect.full actual &&\n'> <'\tgit log --oneline --no-decorate >actual &&\n'> <'\ttest_cmp expect.none actual &&\n'> <'\tgit log --oneline --decorate >actual &&\n'> <'\ttest_cmp expect.short actual &&\n'> <'\n'> <'\ttest_unconfig log.decorate &&\n'> <'\tgit log --pretty=raw >expect.raw &&\n'> <'\ttest_config log.decorate full &&\n'> <'\tgit log --pretty=raw >actual &&\n'> <'\ttest_cmp expect.raw actual\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'reflog is expected format'>)} { (SQ <'\n'> <'\tgit log -g --abbrev-commit --pretty=oneline >expect &&\n'> <'\tgit reflog >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'whatchanged is expected format'>)} { (SQ <'\n'> <'\tgit log --no-merges --raw >expect &&\n'> <'\tgit whatchanged >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'log.abbrevCommit configuration'>)} { (SQ <'\n'> <'\tgit log --abbrev-commit >expect.log.abbrev &&\n'> <'\tgit log --no-abbrev-commit >expect.log.full &&\n'> <'\tgit log --pretty=raw >expect.log.raw &&\n'> <'\tgit reflog --abbrev-commit >expect.reflog.abbrev &&\n'> <'\tgit reflog --no-abbrev-commit >expect.reflog.full &&\n'> <'\tgit whatchanged --abbrev-commit >expect.whatchanged.abbrev &&\n'> <'\tgit whatchanged --no-abbrev-commit >expect.whatchanged.full &&\n'> <'\n'> <'\ttest_config log.abbrevCommit true &&\n'> <'\n'> <'\tgit log >actual &&\n'> <'\ttest_cmp expect.log.abbrev actual &&\n'> <'\tgit log --no-abbrev-commit >actual &&\n'> <'\ttest_cmp expect.log.full actual &&\n'> <'\n'> <'\tgit log --pretty=raw >actual &&\n'> <'\ttest_cmp expect.log.raw actual &&\n'> <'\n'> <'\tgit reflog >actual &&\n'> <'\ttest_cmp expect.reflog.abbrev actual &&\n'> <'\tgit reflog --no-abbrev-commit >actual &&\n'> <'\ttest_cmp expect.reflog.full actual &&\n'> <'\n'> <'\tgit whatchanged >actual &&\n'> <'\ttest_cmp expect.whatchanged.abbrev actual &&\n'> <'\tgit whatchanged --no-abbrev-commit >actual &&\n'> <'\ttest_cmp expect.whatchanged.full actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'show added path under "--follow -M"'>)} { (SQ <'\n'> <'\t# This tests for a regression introduced in v1.7.2-rc0~103^2~2\n'> <'\ttest_create_repo regression &&\n'> <'\t(\n'> <'\t\tcd regression &&\n'> <'\t\ttest_commit needs-another-commit &&\n'> <'\t\ttest_commit foo.bar &&\n'> <'\t\tgit log -M --follow -p foo.bar.t &&\n'> <'\t\tgit log -M --follow --stat foo.bar.t &&\n'> <'\t\tgit log -M --follow --name-only foo.bar.t\n'> <'\t)\n'> ) } ) (C {<test_expect_success>} {(SQ <'git log -c --follow'>)} { (SQ <'\n'> <'\ttest_create_repo follow-c &&\n'> <'\t(\n'> <'\t\tcd follow-c &&\n'> <'\t\ttest_commit initial file original &&\n'> <'\t\tgit rm file &&\n'> <'\t\ttest_commit rename file2 original &&\n'> <'\t\tgit reset --hard initial &&\n'> <'\t\ttest_commit modify file foo &&\n'> <'\t\tgit merge -m merge rename &&\n'> <'\t\tgit log -c --follow file2\n'> <'\t)\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'>) <OF>} here_end_span_id: 1461 stdin_parts: [ <'* commit COMMIT_OBJECT_NAME\n'> <'|\\ Merge: MERGE_PARENTS\n'> <'| | Author: A U Thor <author@example.com>\n'> <'| |\n'> <'| | Merge HEADS DESCRIPTION\n'> <'| |\n'> <'| * commit COMMIT_OBJECT_NAME\n'> <'| | Author: A U Thor <author@example.com>\n'> <'| |\n'> <'| | reach\n'> <'| | ---\n'> <'| | reach.t | 1 +\n'> <'| | 1 file changed, 1 insertion(+)\n'> <'| |\n'> <'| | diff --git a/reach.t b/reach.t\n'> <'| | new file mode 100644\n'> <'| | index 0000000..10c9591\n'> <'| | --- /dev/null\n'> <'| | +++ b/reach.t\n'> <'| | @@ -0,0 +1 @@\n'> <'| | +reach\n'> <'| |\n'> <'| \\\n'> <'*-. \\ commit COMMIT_OBJECT_NAME\n'> <'|\\ \\ \\ Merge: MERGE_PARENTS\n'> <'| | | | Author: A U Thor <author@example.com>\n'> <'| | | |\n'> <'| | | | Merge HEADS DESCRIPTION\n'> <'| | | |\n'> <'| | * | commit COMMIT_OBJECT_NAME\n'> <'| | |/ Author: A U Thor <author@example.com>\n'> <'| | |\n'> <'| | | octopus-b\n'> <'| | | ---\n'> <'| | | octopus-b.t | 1 +\n'> <'| | | 1 file changed, 1 insertion(+)\n'> <'| | |\n'> <'| | | diff --git a/octopus-b.t b/octopus-b.t\n'> <'| | | new file mode 100644\n'> <'| | | index 0000000..d5fcad0\n'> <'| | | --- /dev/null\n'> <'| | | +++ b/octopus-b.t\n'> <'| | | @@ -0,0 +1 @@\n'> <'| | | +octopus-b\n'> <'| | |\n'> <'| * | commit COMMIT_OBJECT_NAME\n'> <'| |/ Author: A U Thor <author@example.com>\n'> <'| |\n'> <'| | octopus-a\n'> <'| | ---\n'> <'| | octopus-a.t | 1 +\n'> <'| | 1 file changed, 1 insertion(+)\n'> <'| |\n'> <'| | diff --git a/octopus-a.t b/octopus-a.t\n'> <'| | new file mode 100644\n'> <'| | index 0000000..11ee015\n'> <'| | --- /dev/null\n'> <'| | +++ b/octopus-a.t\n'> <'| | @@ -0,0 +1 @@\n'> <'| | +octopus-a\n'> <'| |\n'> <'* | commit COMMIT_OBJECT_NAME\n'> <'|/ Author: A U Thor <author@example.com>\n'> <'|\n'> <'| seventh\n'> <'| ---\n'> <'| seventh.t | 1 +\n'> <'| 1 file changed, 1 insertion(+)\n'> <'|\n'> <'| diff --git a/seventh.t b/seventh.t\n'> <'| new file mode 100644\n'> <'| index 0000000..9744ffc\n'> <'| --- /dev/null\n'> <'| +++ b/seventh.t\n'> <'| @@ -0,0 +1 @@\n'> <'| +seventh\n'> <'|\n'> <'* commit COMMIT_OBJECT_NAME\n'> <'|\\ Merge: MERGE_PARENTS\n'> <'| | Author: A U Thor <author@example.com>\n'> <'| |\n'> <'| | Merge branch \'tangle\'\n'> <'| |\n'> <'| * commit COMMIT_OBJECT_NAME\n'> <'| |\\ Merge: MERGE_PARENTS\n'> <'| | | Author: A U Thor <author@example.com>\n'> <'| | |\n'> <'| | | Merge branch \'side\' (early part) into tangle\n'> <'| | |\n'> <'| * | commit COMMIT_OBJECT_NAME\n'> <'| |\\ \\ Merge: MERGE_PARENTS\n'> <'| | | | Author: A U Thor <author@example.com>\n'> <'| | | |\n'> <'| | | | Merge branch \'master\' (early part) into tangle\n'> <'| | | |\n'> <'| * | | commit COMMIT_OBJECT_NAME\n'> <'| | | | Author: A U Thor <author@example.com>\n'> <'| | | |\n'> <'| | | | tangle-a\n'> <'| | | | ---\n'> <'| | | | tangle-a | 1 +\n'> <'| | | | 1 file changed, 1 insertion(+)\n'> <'| | | |\n'> <'| | | | diff --git a/tangle-a b/tangle-a\n'> <'| | | | new file mode 100644\n'> <'| | | | index 0000000..7898192\n'> <'| | | | --- /dev/null\n'> <'| | | | +++ b/tangle-a\n'> <'| | | | @@ -0,0 +1 @@\n'> <'| | | | +a\n'> <'| | | |\n'> <'* | | | commit COMMIT_OBJECT_NAME\n'> <'|\\ \\ \\ \\ Merge: MERGE_PARENTS\n'> <'| | | | | Author: A U Thor <author@example.com>\n'> <'| | | | |\n'> <'| | | | | Merge branch \'side\'\n'> <'| | | | |\n'> <'| * | | | commit COMMIT_OBJECT_NAME\n'> <'| | |_|/ Author: A U Thor <author@example.com>\n'> <'| |/| |\n'> <'| | | | side-2\n'> <'| | | | ---\n'> <'| | | | 2 | 1 +\n'> <'| | | | 1 file changed, 1 insertion(+)\n'> <'| | | |\n'> <'| | | | diff --git a/2 b/2\n'> <'| | | | new file mode 100644\n'> <'| | | | index 0000000..0cfbf08\n'> <'| | | | --- /dev/null\n'> <'| | | | +++ b/2\n'> <'| | | | @@ -0,0 +1 @@\n'> <'| | | | +2\n'> <'| | | |\n'> <'| * | | commit COMMIT_OBJECT_NAME\n'> <'| | | | Author: A U Thor <author@example.com>\n'> <'| | | |\n'> <'| | | | side-1\n'> <'| | | | ---\n'> <'| | | | 1 | 1 +\n'> <'| | | | 1 file changed, 1 insertion(+)\n'> <'| | | |\n'> <'| | | | diff --git a/1 b/1\n'> <'| | | | new file mode 100644\n'> <'| | | | index 0000000..d00491f\n'> <'| | | | --- /dev/null\n'> <'| | | | +++ b/1\n'> <'| | | | @@ -0,0 +1 @@\n'> <'| | | | +1\n'> <'| | | |\n'> <'* | | | commit COMMIT_OBJECT_NAME\n'> <'| | | | Author: A U Thor <author@example.com>\n'> <'| | | |\n'> <'| | | | Second\n'> <'| | | | ---\n'> <'| | | | one | 1 +\n'> <'| | | | 1 file changed, 1 insertion(+)\n'> <'| | | |\n'> <'| | | | diff --git a/one b/one\n'> <'| | | | new file mode 100644\n'> <'| | | | index 0000000..9a33383\n'> <'| | | | --- /dev/null\n'> <'| | | | +++ b/one\n'> <'| | | | @@ -0,0 +1 @@\n'> <'| | | | +case\n'> <'| | | |\n'> <'* | | | commit COMMIT_OBJECT_NAME\n'> <'| |_|/ Author: A U Thor <author@example.com>\n'> <'|/| |\n'> <'| | | sixth\n'> <'| | | ---\n'> <'| | | a/two | 1 -\n'> <'| | | 1 file changed, 1 deletion(-)\n'> <'| | |\n'> <'| | | diff --git a/a/two b/a/two\n'> <'| | | deleted file mode 100644\n'> <'| | | index 9245af5..0000000\n'> <'| | | --- a/a/two\n'> <'| | | +++ /dev/null\n'> <'| | | @@ -1 +0,0 @@\n'> <'| | | -ni\n'> <'| | |\n'> <'* | | commit COMMIT_OBJECT_NAME\n'> <'| | | Author: A U Thor <author@example.com>\n'> <'| | |\n'> <'| | | fifth\n'> <'| | | ---\n'> <'| | | a/two | 1 +\n'> <'| | | 1 file changed, 1 insertion(+)\n'> <'| | |\n'> <'| | | diff --git a/a/two b/a/two\n'> <'| | | new file mode 100644\n'> <'| | | index 0000000..9245af5\n'> <'| | | --- /dev/null\n'> <'| | | +++ b/a/two\n'> <'| | | @@ -0,0 +1 @@\n'> <'| | | +ni\n'> <'| | |\n'> <'* | | commit COMMIT_OBJECT_NAME\n'> <'|/ / Author: A U Thor <author@example.com>\n'> <'| |\n'> <'| | fourth\n'> <'| | ---\n'> <'| | ein | 1 +\n'> <'| | 1 file changed, 1 insertion(+)\n'> <'| |\n'> <'| | diff --git a/ein b/ein\n'> <'| | new file mode 100644\n'> <'| | index 0000000..9d7e69f\n'> <'| | --- /dev/null\n'> <'| | +++ b/ein\n'> <'| | @@ -0,0 +1 @@\n'> <'| | +ichi\n'> <'| |\n'> <'* | commit COMMIT_OBJECT_NAME\n'> <'|/ Author: A U Thor <author@example.com>\n'> <'|\n'> <'| third\n'> <'| ---\n'> <'| ichi | 1 +\n'> <'| one | 1 -\n'> <'| 2 files changed, 1 insertion(+), 1 deletion(-)\n'> <'|\n'> <'| diff --git a/ichi b/ichi\n'> <'| new file mode 100644\n'> <'| index 0000000..9d7e69f\n'> <'| --- /dev/null\n'> <'| +++ b/ichi\n'> <'| @@ -0,0 +1 @@\n'> <'| +ichi\n'> <'| diff --git a/one b/one\n'> <'| deleted file mode 100644\n'> <'| index 9d7e69f..0000000\n'> <'| --- a/one\n'> <'| +++ /dev/null\n'> <'| @@ -1 +0,0 @@\n'> <'| -ichi\n'> <'|\n'> <'* commit COMMIT_OBJECT_NAME\n'> <'| Author: A U Thor <author@example.com>\n'> <'|\n'> <'| second\n'> <'| ---\n'> <'| one | 2 +-\n'> <'| 1 file changed, 1 insertion(+), 1 deletion(-)\n'> <'|\n'> <'| diff --git a/one b/one\n'> <'| index 5626abf..9d7e69f 100644\n'> <'| --- a/one\n'> <'| +++ b/one\n'> <'| @@ -1 +1 @@\n'> <'| -one\n'> <'| +ichi\n'> <'|\n'> <'* commit COMMIT_OBJECT_NAME\n'> <' Author: A U Thor <author@example.com>\n'> <'\n'> <' initial\n'> <' ---\n'> <' one | 1 +\n'> <' 1 file changed, 1 insertion(+)\n'> <'\n'> <' diff --git a/one b/one\n'> <' new file mode 100644\n'> <' index 0000000..5626abf\n'> <' --- /dev/null\n'> <' +++ b/one\n'> <' @@ -0,0 +1 @@\n'> <' +one\n'> ] ) ) ] do_fork: T ) (command.ShFunction name: sanitize_output body: (BraceGroup children: [ (C {<sed>} {<-e>} {(SQ <'s/ *$//'>)} {<-e>} {(SQ <'s/commit [0-9a-f]*$/commit COMMIT_OBJECT_NAME/'>)} {<-e>} {(SQ <'s/Merge: [ 0-9a-f]*$/Merge: MERGE_PARENTS/'>)} {<-e>} {(SQ <'s/Merge tag.*/Merge HEADS DESCRIPTION/'>)} {<-e>} {(SQ <'s/Merge commit.*/Merge HEADS DESCRIPTION/'>)} {<-e>} {(SQ <'s/, 0 deletions(-)//'>)} {<-e>} {(SQ <'s/, 0 insertions(+)//'>)} {<-e>} {(SQ <'s/ 1 files changed, / 1 file changed, /'>)} {<-e>} {(SQ <'s/, 1 deletions(-)/, 1 deletion(-)/'>)} {<-e>} {(SQ <'s/, 1 insertions(+)/, 1 insertion(+)/'>)} ) ] ) ) (C {<test_expect_success>} {(SQ <'log --graph with diff and stats'>)} { (SQ <'\n'> <'\tgit log --no-renames --graph --pretty=short --stat -p >actual &&\n'> <'\tsanitize_output >actual.sanitized <actual &&\n'> <'\ttest_i18ncmp expect actual.sanitized\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {(word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\E'>) <OF>} here_end_span_id: 1845 stdin_parts: [ <'*** * commit COMMIT_OBJECT_NAME\n'> <'*** |\\ Merge: MERGE_PARENTS\n'> <'*** | | Author: A U Thor <author@example.com>\n'> <'*** | |\n'> <'*** | | Merge HEADS DESCRIPTION\n'> <'*** | |\n'> <'*** | * commit COMMIT_OBJECT_NAME\n'> <'*** | | Author: A U Thor <author@example.com>\n'> <'*** | |\n'> <'*** | | reach\n'> <'*** | | ---\n'> <'*** | | reach.t | 1 +\n'> <'*** | | 1 file changed, 1 insertion(+)\n'> <'*** | |\n'> <'*** | | diff --git a/reach.t b/reach.t\n'> <'*** | | new file mode 100644\n'> <'*** | | index 0000000..10c9591\n'> <'*** | | --- /dev/null\n'> <'*** | | +++ b/reach.t\n'> <'*** | | @@ -0,0 +1 @@\n'> <'*** | | +reach\n'> <'*** | |\n'> <'*** | \\\n'> <'*** *-. \\ commit COMMIT_OBJECT_NAME\n'> <'*** |\\ \\ \\ Merge: MERGE_PARENTS\n'> <'*** | | | | Author: A U Thor <author@example.com>\n'> <'*** | | | |\n'> <'*** | | | | Merge HEADS DESCRIPTION\n'> <'*** | | | |\n'> <'*** | | * | commit COMMIT_OBJECT_NAME\n'> <'*** | | |/ Author: A U Thor <author@example.com>\n'> <'*** | | |\n'> <'*** | | | octopus-b\n'> <'*** | | | ---\n'> <'*** | | | octopus-b.t | 1 +\n'> <'*** | | | 1 file changed, 1 insertion(+)\n'> <'*** | | |\n'> <'*** | | | diff --git a/octopus-b.t b/octopus-b.t\n'> <'*** | | | new file mode 100644\n'> <'*** | | | index 0000000..d5fcad0\n'> <'*** | | | --- /dev/null\n'> <'*** | | | +++ b/octopus-b.t\n'> <'*** | | | @@ -0,0 +1 @@\n'> <'*** | | | +octopus-b\n'> <'*** | | |\n'> <'*** | * | commit COMMIT_OBJECT_NAME\n'> <'*** | |/ Author: A U Thor <author@example.com>\n'> <'*** | |\n'> <'*** | | octopus-a\n'> <'*** | | ---\n'> <'*** | | octopus-a.t | 1 +\n'> <'*** | | 1 file changed, 1 insertion(+)\n'> <'*** | |\n'> <'*** | | diff --git a/octopus-a.t b/octopus-a.t\n'> <'*** | | new file mode 100644\n'> <'*** | | index 0000000..11ee015\n'> <'*** | | --- /dev/null\n'> <'*** | | +++ b/octopus-a.t\n'> <'*** | | @@ -0,0 +1 @@\n'> <'*** | | +octopus-a\n'> <'*** | |\n'> <'*** * | commit COMMIT_OBJECT_NAME\n'> <'*** |/ Author: A U Thor <author@example.com>\n'> <'*** |\n'> <'*** | seventh\n'> <'*** | ---\n'> <'*** | seventh.t | 1 +\n'> <'*** | 1 file changed, 1 insertion(+)\n'> <'*** |\n'> <'*** | diff --git a/seventh.t b/seventh.t\n'> <'*** | new file mode 100644\n'> <'*** | index 0000000..9744ffc\n'> <'*** | --- /dev/null\n'> <'*** | +++ b/seventh.t\n'> <'*** | @@ -0,0 +1 @@\n'> <'*** | +seventh\n'> <'*** |\n'> <'*** * commit COMMIT_OBJECT_NAME\n'> <'*** |\\ Merge: MERGE_PARENTS\n'> <'*** | | Author: A U Thor <author@example.com>\n'> <'*** | |\n'> <'*** | | Merge branch \'tangle\'\n'> <'*** | |\n'> <'*** | * commit COMMIT_OBJECT_NAME\n'> <'*** | |\\ Merge: MERGE_PARENTS\n'> <'*** | | | Author: A U Thor <author@example.com>\n'> <'*** | | |\n'> <'*** | | | Merge branch \'side\' (early part) into tangle\n'> <'*** | | |\n'> <'*** | * | commit COMMIT_OBJECT_NAME\n'> <'*** | |\\ \\ Merge: MERGE_PARENTS\n'> <'*** | | | | Author: A U Thor <author@example.com>\n'> <'*** | | | |\n'> <'*** | | | | Merge branch \'master\' (early part) into tangle\n'> <'*** | | | |\n'> <'*** | * | | commit COMMIT_OBJECT_NAME\n'> <'*** | | | | Author: A U Thor <author@example.com>\n'> <'*** | | | |\n'> <'*** | | | | tangle-a\n'> <'*** | | | | ---\n'> <'*** | | | | tangle-a | 1 +\n'> <'*** | | | | 1 file changed, 1 insertion(+)\n'> <'*** | | | |\n'> <'*** | | | | diff --git a/tangle-a b/tangle-a\n'> <'*** | | | | new file mode 100644\n'> <'*** | | | | index 0000000..7898192\n'> <'*** | | | | --- /dev/null\n'> <'*** | | | | +++ b/tangle-a\n'> <'*** | | | | @@ -0,0 +1 @@\n'> <'*** | | | | +a\n'> <'*** | | | |\n'> <'*** * | | | commit COMMIT_OBJECT_NAME\n'> <'*** |\\ \\ \\ \\ Merge: MERGE_PARENTS\n'> <'*** | | | | | Author: A U Thor <author@example.com>\n'> <'*** | | | | |\n'> <'*** | | | | | Merge branch \'side\'\n'> <'*** | | | | |\n'> <'*** | * | | | commit COMMIT_OBJECT_NAME\n'> <'*** | | |_|/ Author: A U Thor <author@example.com>\n'> <'*** | |/| |\n'> <'*** | | | | side-2\n'> <'*** | | | | ---\n'> <'*** | | | | 2 | 1 +\n'> <'*** | | | | 1 file changed, 1 insertion(+)\n'> <'*** | | | |\n'> <'*** | | | | diff --git a/2 b/2\n'> <'*** | | | | new file mode 100644\n'> <'*** | | | | index 0000000..0cfbf08\n'> <'*** | | | | --- /dev/null\n'> <'*** | | | | +++ b/2\n'> <'*** | | | | @@ -0,0 +1 @@\n'> <'*** | | | | +2\n'> <'*** | | | |\n'> <'*** | * | | commit COMMIT_OBJECT_NAME\n'> <'*** | | | | Author: A U Thor <author@example.com>\n'> <'*** | | | |\n'> <'*** | | | | side-1\n'> <'*** | | | | ---\n'> <'*** | | | | 1 | 1 +\n'> <'*** | | | | 1 file changed, 1 insertion(+)\n'> <'*** | | | |\n'> <'*** | | | | diff --git a/1 b/1\n'> <'*** | | | | new file mode 100644\n'> <'*** | | | | index 0000000..d00491f\n'> <'*** | | | | --- /dev/null\n'> <'*** | | | | +++ b/1\n'> <'*** | | | | @@ -0,0 +1 @@\n'> <'*** | | | | +1\n'> <'*** | | | |\n'> <'*** * | | | commit COMMIT_OBJECT_NAME\n'> <'*** | | | | Author: A U Thor <author@example.com>\n'> <'*** | | | |\n'> <'*** | | | | Second\n'> <'*** | | | | ---\n'> <'*** | | | | one | 1 +\n'> <'*** | | | | 1 file changed, 1 insertion(+)\n'> <'*** | | | |\n'> <'*** | | | | diff --git a/one b/one\n'> <'*** | | | | new file mode 100644\n'> <'*** | | | | index 0000000..9a33383\n'> <'*** | | | | --- /dev/null\n'> <'*** | | | | +++ b/one\n'> <'*** | | | | @@ -0,0 +1 @@\n'> <'*** | | | | +case\n'> <'*** | | | |\n'> <'*** * | | | commit COMMIT_OBJECT_NAME\n'> <'*** | |_|/ Author: A U Thor <author@example.com>\n'> <'*** |/| |\n'> <'*** | | | sixth\n'> <'*** | | | ---\n'> <'*** | | | a/two | 1 -\n'> <'*** | | | 1 file changed, 1 deletion(-)\n'> <'*** | | |\n'> <'*** | | | diff --git a/a/two b/a/two\n'> <'*** | | | deleted file mode 100644\n'> <'*** | | | index 9245af5..0000000\n'> <'*** | | | --- a/a/two\n'> <'*** | | | +++ /dev/null\n'> <'*** | | | @@ -1 +0,0 @@\n'> <'*** | | | -ni\n'> <'*** | | |\n'> <'*** * | | commit COMMIT_OBJECT_NAME\n'> <'*** | | | Author: A U Thor <author@example.com>\n'> <'*** | | |\n'> <'*** | | | fifth\n'> <'*** | | | ---\n'> <'*** | | | a/two | 1 +\n'> <'*** | | | 1 file changed, 1 insertion(+)\n'> <'*** | | |\n'> <'*** | | | diff --git a/a/two b/a/two\n'> <'*** | | | new file mode 100644\n'> <'*** | | | index 0000000..9245af5\n'> <'*** | | | --- /dev/null\n'> <'*** | | | +++ b/a/two\n'> <'*** | | | @@ -0,0 +1 @@\n'> <'*** | | | +ni\n'> <'*** | | |\n'> <'*** * | | commit COMMIT_OBJECT_NAME\n'> <'*** |/ / Author: A U Thor <author@example.com>\n'> <'*** | |\n'> <'*** | | fourth\n'> <'*** | | ---\n'> <'*** | | ein | 1 +\n'> <'*** | | 1 file changed, 1 insertion(+)\n'> <'*** | |\n'> <'*** | | diff --git a/ein b/ein\n'> <'*** | | new file mode 100644\n'> <'*** | | index 0000000..9d7e69f\n'> <'*** | | --- /dev/null\n'> <'*** | | +++ b/ein\n'> <'*** | | @@ -0,0 +1 @@\n'> <'*** | | +ichi\n'> <'*** | |\n'> <'*** * | commit COMMIT_OBJECT_NAME\n'> <'*** |/ Author: A U Thor <author@example.com>\n'> <'*** |\n'> <'*** | third\n'> <'*** | ---\n'> <'*** | ichi | 1 +\n'> <'*** | one | 1 -\n'> <'*** | 2 files changed, 1 insertion(+), 1 deletion(-)\n'> <'*** |\n'> <'*** | diff --git a/ichi b/ichi\n'> <'*** | new file mode 100644\n'> <'*** | index 0000000..9d7e69f\n'> <'*** | --- /dev/null\n'> <'*** | +++ b/ichi\n'> <'*** | @@ -0,0 +1 @@\n'> <'*** | +ichi\n'> <'*** | diff --git a/one b/one\n'> <'*** | deleted file mode 100644\n'> <'*** | index 9d7e69f..0000000\n'> <'*** | --- a/one\n'> <'*** | +++ /dev/null\n'> <'*** | @@ -1 +0,0 @@\n'> <'*** | -ichi\n'> <'*** |\n'> <'*** * commit COMMIT_OBJECT_NAME\n'> <'*** | Author: A U Thor <author@example.com>\n'> <'*** |\n'> <'*** | second\n'> <'*** | ---\n'> <'*** | one | 2 +-\n'> <'*** | 1 file changed, 1 insertion(+), 1 deletion(-)\n'> <'*** |\n'> <'*** | diff --git a/one b/one\n'> <'*** | index 5626abf..9d7e69f 100644\n'> <'*** | --- a/one\n'> <'*** | +++ b/one\n'> <'*** | @@ -1 +1 @@\n'> <'*** | -one\n'> <'*** | +ichi\n'> <'*** |\n'> <'*** * commit COMMIT_OBJECT_NAME\n'> <'*** Author: A U Thor <author@example.com>\n'> <'***\n'> <'*** initial\n'> <'*** ---\n'> <'*** one | 1 +\n'> <'*** 1 file changed, 1 insertion(+)\n'> <'***\n'> <'*** diff --git a/one b/one\n'> <'*** new file mode 100644\n'> <'*** index 0000000..5626abf\n'> <'*** --- /dev/null\n'> <'*** +++ b/one\n'> <'*** @@ -0,0 +1 @@\n'> <'*** +one\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'log --line-prefix="*** " --graph with diff and stats'>)} { (SQ <'\n'> < '\tgit log --line-prefix="*** " --no-renames --graph --pretty=short --stat -p >actual &&\n' > <'\tsanitize_output >actual.sanitized <actual &&\n'> <'\ttest_i18ncmp expect actual.sanitized\n'> ) } ) (C {<test_expect_success>} {(SQ <'dotdot is a parent directory'>)} { (SQ <'\n'> <'\tmkdir -p a/b &&\n'> <'\t( echo sixth && echo fifth ) >expect &&\n'> <'\t( cd a/b && git log --format=%s .. ) >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {<GPG>} {(SQ <'setup signed branch'>)} { (SQ <'\n'> <'\ttest_when_finished "git reset --hard && git checkout master" &&\n'> <'\tgit checkout -b signed master &&\n'> <'\techo foo >foo &&\n'> <'\tgit add foo &&\n'> <'\tgit commit -S -m signed_commit\n'> ) } ) (C {<test_expect_success>} {<GPG>} {(SQ <'log --graph --show-signature'>)} { (SQ <'\n'> <'\tgit log --graph --show-signature -n1 signed >actual &&\n'> <'\tgrep "^| gpg: Signature made" actual &&\n'> <'\tgrep "^| gpg: Good signature" actual\n'> ) } ) (C {<test_expect_success>} {<GPG>} {(SQ <'log --graph --show-signature for merged tag'>)} { (SQ <'\n'> <'\ttest_when_finished "git reset --hard && git checkout master" &&\n'> <'\tgit checkout -b plain master &&\n'> <'\techo aaa >bar &&\n'> <'\tgit add bar &&\n'> <'\tgit commit -m bar_commit &&\n'> <'\tgit checkout -b tagged master &&\n'> <'\techo bbb >baz &&\n'> <'\tgit add baz &&\n'> <'\tgit commit -m baz_commit &&\n'> <'\tgit tag -s -m signed_tag_msg signed_tag &&\n'> <'\tgit checkout plain &&\n'> <'\tgit merge --no-ff -m msg signed_tag &&\n'> <'\tgit log --graph --show-signature -n1 plain >actual &&\n'> <'\tgrep "^|\\\\\\ merged tag" actual &&\n'> <'\tgrep "^| | gpg: Signature made" actual &&\n'> <'\tgrep "^| | gpg: Good signature" actual\n'> ) } ) (C {<test_expect_success>} {<GPG>} {(SQ <'--no-show-signature overrides --show-signature'>)} { (SQ <'\n'> <'\tgit log -1 --show-signature --no-show-signature signed >actual &&\n'> <'\t! grep "^gpg:" actual\n'> ) } ) (C {<test_expect_success>} {<GPG>} {(SQ <'log.showsignature=true behaves like --show-signature'>)} { (SQ <'\n'> <'\ttest_config log.showsignature true &&\n'> <'\tgit log -1 signed >actual &&\n'> <'\tgrep "gpg: Signature made" actual &&\n'> <'\tgrep "gpg: Good signature" actual\n'> ) } ) (C {<test_expect_success>} {<GPG>} {(SQ <'--no-show-signature overrides log.showsignature=true'>)} { (SQ <'\n'> <'\ttest_config log.showsignature true &&\n'> <'\tgit log -1 --no-show-signature signed >actual &&\n'> <'\t! grep "^gpg:" actual\n'> ) } ) (C {<test_expect_success>} {<GPG>} {(SQ <'--show-signature overrides log.showsignature=false'>)} { (SQ <'\n'> <'\ttest_config log.showsignature false &&\n'> <'\tgit log -1 --show-signature signed >actual &&\n'> <'\tgrep "gpg: Signature made" actual &&\n'> <'\tgrep "gpg: Good signature" actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'log --graph --no-walk is forbidden'>)} {(SQ <'\n'> <'\ttest_must_fail git log --graph --no-walk\n'>)} ) (C {<test_expect_success>} {(SQ <'log diagnoses bogus HEAD'>)} { (SQ <'\n'> <'\tgit init empty &&\n'> <'\ttest_must_fail git -C empty log 2>stderr &&\n'> <'\ttest_i18ngrep does.not.have.any.commits stderr &&\n'> <'\techo 1234abcd >empty/.git/refs/heads/master &&\n'> <'\ttest_must_fail git -C empty log 2>stderr &&\n'> <'\ttest_i18ngrep broken stderr &&\n'> <'\techo "ref: refs/heads/invalid.lock" >empty/.git/HEAD &&\n'> <'\ttest_must_fail git -C empty log 2>stderr &&\n'> <'\ttest_i18ngrep broken stderr &&\n'> <'\ttest_must_fail git -C empty log --default totally-bogus 2>stderr &&\n'> <'\ttest_i18ngrep broken stderr\n'> ) } ) (C {<test_expect_success>} {(SQ <'set up --source tests'>)} { (SQ <'\n'> <'\tgit checkout --orphan source-a &&\n'> <'\ttest_commit one &&\n'> <'\ttest_commit two &&\n'> <'\tgit checkout -b source-b HEAD^ &&\n'> <'\ttest_commit three\n'> ) } ) (C {<test_expect_success>} {(SQ <'log --source paints branch names'>)} { (SQ <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t09e12a9\tsource-b three\n'> <'\t8e393e1\tsource-a two\n'> <'\t1ac6c77\tsource-b one\n'> <'\tEOF\n'> <'\tgit log --oneline --source source-a source-b >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'log --source paints tag names'>)} { (SQ <'\n'> <'\tgit tag -m tagged source-tag &&\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t09e12a9\tsource-tag three\n'> <'\t8e393e1\tsource-a two\n'> <'\t1ac6c77\tsource-tag one\n'> <'\tEOF\n'> <'\tgit log --oneline --source source-tag source-a >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (C {<test_done>}) ] )