(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: {(SQ <'git status'>)} spids: [13] ) ] ) (C {<.>} {<'./test-lib.sh'>}) (C {<test_expect_success>} {(SQ <'status -h in broken repository'>)} { (SQ <'\n'> <'\tgit config --global advice.statusuoption false &&\n'> <'\tmkdir broken &&\n'> <'\ttest_when_finished "rm -fr broken" &&\n'> <'\t(\n'> <'\t\tcd broken &&\n'> <'\t\tgit init &&\n'> <'\t\techo "[status] showuntrackedfiles = CORRUPT" >>.git/config &&\n'> <'\t\ttest_expect_code 129 git status -h >usage 2>&1\n'> <'\t) &&\n'> <'\ttest_i18ngrep "[Uu]sage" broken/usage\n'> ) } ) (C {<test_expect_success>} {(SQ <'commit -h in broken repository'>)} { (SQ <'\n'> <'\tmkdir broken &&\n'> <'\ttest_when_finished "rm -fr broken" &&\n'> <'\t(\n'> <'\t\tcd broken &&\n'> <'\t\tgit init &&\n'> <'\t\techo "[status] showuntrackedfiles = CORRUPT" >>.git/config &&\n'> <'\t\ttest_expect_code 129 git commit -h >usage 2>&1\n'> <'\t) &&\n'> <'\ttest_i18ngrep "[Uu]sage" broken/usage\n'> ) } ) (C {<test_expect_success>} {(SQ <setup>)} { (SQ <'\n'> <'\t: >tracked &&\n'> <'\t: >modified &&\n'> <'\tmkdir dir1 &&\n'> <'\t: >dir1/tracked &&\n'> <'\t: >dir1/modified &&\n'> <'\tmkdir dir2 &&\n'> <'\t: >dir1/tracked &&\n'> <'\t: >dir1/modified &&\n'> <'\tgit add . &&\n'> <'\n'> <'\tgit status >output &&\n'> <'\n'> <'\ttest_tick &&\n'> <'\tgit commit -m initial &&\n'> <'\t: >untracked &&\n'> <'\t: >dir1/untracked &&\n'> <'\t: >dir2/untracked &&\n'> <'\techo 1 >dir1/modified &&\n'> <'\techo 2 >dir2/modified &&\n'> <'\techo 3 >dir2/added &&\n'> <'\tgit add dir2/added\n'> ) } ) (C {<test_expect_success>} {(SQ <'status (1)'>)} { (SQ <'\n'> <'\ttest_i18ngrep "use \\"git rm --cached <file>\\.\\.\\.\\" to unstage" output\n'>) } ) (command.ShFunction name: strip_comments body: (BraceGroup children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:tab) op: assign_op.Equal rhs: {(SQ <'\t'>)} spids: [117] ) ] ) (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (command.Simple words: [ {<sed>} { (DQ <'s/^'> <Id.Lit_BadBackslash '\\'> <'# //; s/^'> <Id.Lit_BadBackslash '\\'> <'#'> <Id.Lit_Dollar '$'> <'//; s/^#'> ($ Id.VSub_DollarName '$tab') <'/'> ($ Id.VSub_DollarName '$tab') <'/'> ) } ] redirects: [ (redir op: <Id.Redir_Less '<'> loc: (redir_loc.Fd fd:0) arg: {(DQ ($ Id.VSub_Number '$1'))} ) (redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {(DQ ($ Id.VSub_Number '$1')) <.tmp>} ) ] do_fork: T ) (C {<rm>} {(DQ ($ Id.VSub_Number '$1'))}) (C {<mv>} {(DQ ($ Id.VSub_Number '$1')) <.tmp>} {(DQ ($ Id.VSub_Number '$1'))}) ] ) ] ) ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<.gitignore>}) (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: 187 stdin_parts: [<'.gitignore\n'> <'expect*\n'> <'output*\n'>] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status --column'>)} { (SQ <'\n'> <'\tcat >expect <<\\EOF &&\n'> <'# On branch master\n'> <'# Changes to be committed:\n'> <'# (use "git reset HEAD <file>..." to unstage)\n'> <'#\n'> <'#\tnew file: dir2/added\n'> <'#\n'> <'# Changes not staged for commit:\n'> <'# (use "git add <file>..." to update what will be committed)\n'> <'# (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'#\n'> <'#\tmodified: dir1/modified\n'> <'#\n'> <'# Untracked files:\n'> <'# (use "git add <file>..." to include in what will be committed)\n'> <'#\n'> <'#\tdir1/untracked dir2/untracked\n'> <'#\tdir2/modified untracked\n'> <'#\n'> <'EOF\n'> < '\tCOLUMNS=50 git -c status.displayCommentPrefix=true status --column="column dense" >output &&\n' > <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status --column status.displayCommentPrefix=false'>)} { (SQ <'\n'> <'\tstrip_comments expect &&\n'> < '\tCOLUMNS=49 git -c status.displayCommentPrefix=false status --column="column dense" >output &&\n' > <'\ttest_i18ncmp expect output\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: 265 stdin_parts: [ <'# On branch master\n'> <'# Changes to be committed:\n'> <'# (use "git reset HEAD <file>..." to unstage)\n'> <'#\n'> <'#\tnew file: dir2/added\n'> <'#\n'> <'# Changes not staged for commit:\n'> <'# (use "git add <file>..." to update what will be committed)\n'> <'# (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'#\n'> <'#\tmodified: dir1/modified\n'> <'#\n'> <'# Untracked files:\n'> <'# (use "git add <file>..." to include in what will be committed)\n'> <'#\n'> <'#\tdir1/untracked\n'> <'#\tdir2/modified\n'> <'#\tdir2/untracked\n'> <'#\tuntracked\n'> <'#\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status with status.displayCommentPrefix=true'>)} { (SQ <'\n'> <'\tgit -c status.displayCommentPrefix=true status >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status with status.displayCommentPrefix=false'>)} { (SQ <'\n'> <'\tstrip_comments expect &&\n'> <'\tgit -c status.displayCommentPrefix=false status >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status -v'>)} { (SQ <'\n'> <'\t(cat expect && git diff --cached) >expect-with-v &&\n'> <'\tgit status -v >output &&\n'> <'\ttest_i18ncmp expect-with-v output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status -v -v'>)} { (SQ <'\n'> <'\t(cat expect &&\n'> <'\t echo "Changes to be committed:" &&\n'> <'\t git -c diff.mnemonicprefix=true diff --cached &&\n'> <'\t echo "--------------------------------------------------" &&\n'> <'\t echo "Changes not staged for commit:" &&\n'> <'\t git -c diff.mnemonicprefix=true diff) >expect-with-v &&\n'> <'\tgit status -v -v >output &&\n'> <'\ttest_i18ncmp expect-with-v output\n'> ) } ) (C {<test_expect_success>} {(SQ <'setup fake editor'>)} { (SQ <'\n'> <'\tcat >.git/editor <<-\\EOF &&\n'> <'\t#! /bin/sh\n'> <'\tcp "$1" output\n'> <'EOF\n'> <'\tchmod 755 .git/editor\n'> ) } ) (command.ShFunction name: commit_template_commented body: (BraceGroup children: [ (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Subshell child: (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:EDITOR) op: assign_op.Equal rhs: {<'.git/editor'>} spids: [354] ) ] ) (C {<export>} {<EDITOR>}) (C {<test_must_fail>} {<git>} {<commit>}) ] ) ) (command.Pipeline children: [(C {<grep>} {(SQ <'^[^#]'>)} {<output>})] negated: T ) ] ) ] ) ) (C {<test_expect_success>} {(SQ <'commit ignores status.displayCommentPrefix=false in COMMIT_EDITMSG'>)} {(SQ <'\n'> <'\tcommit_template_commented\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: 430 stdin_parts: [ <'On branch master\n'> <'Changes to be committed:\n'> <'\tnew file: dir2/added\n'> <'\n'> <'Changes not staged for commit:\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files:\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tuntracked\n'> <'\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status (advice.statusHints false)'>)} { (SQ <'\n'> <'\ttest_config advice.statusHints false &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output\n'> <'\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: 462 stdin_parts: [ <' M dir1/modified\n'> <'A dir2/added\n'> <'?? dir1/untracked\n'> <'?? dir2/modified\n'> <'?? dir2/untracked\n'> <'?? untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status -s'>)} {(SQ <'\n'> <'\n'> <'\tgit status -s >output &&\n'> <'\ttest_cmp expect output\n'> <'\n'>)} ) (C {<test_expect_success>} {(SQ <'status with gitignore'>)} { (SQ <'\n'> <'\t{\n'> <'\t\techo ".gitignore" &&\n'> <'\t\techo "expect*" &&\n'> <'\t\techo "output" &&\n'> <'\t\techo "untracked"\n'> <'\t} >.gitignore &&\n'> <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t M dir1/modified\n'> <'\tA dir2/added\n'> <'\t?? dir2/modified\n'> <'\tEOF\n'> <'\tgit status -s >output &&\n'> <'\ttest_cmp expect output &&\n'> <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t M dir1/modified\n'> <'\tA dir2/added\n'> <'\t?? dir2/modified\n'> <'\t!! .gitignore\n'> <'\t!! dir1/untracked\n'> <'\t!! dir2/untracked\n'> <'\t!! expect\n'> <'\t!! expect-with-v\n'> <'\t!! output\n'> <'\t!! untracked\n'> <'\tEOF\n'> <'\tgit status -s --ignored >output &&\n'> <'\ttest_cmp expect output &&\n'> <'\n'> <'\tcat >expect <<\\EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tnew file: dir2/added\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\tdir2/modified\n'> <'\n'> <'Ignored files:\n'> <' (use "git add -f <file>..." to include in what will be committed)\n'> <'\n'> <'\t.gitignore\n'> <'\tdir1/untracked\n'> <'\tdir2/untracked\n'> <'\texpect\n'> <'\texpect-with-v\n'> <'\toutput\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\tgit status --ignored >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status with gitignore (nothing untracked)'>)} { (SQ <'\n'> <'\t{\n'> <'\t\techo ".gitignore" &&\n'> <'\t\techo "expect*" &&\n'> <'\t\techo "dir2/modified" &&\n'> <'\t\techo "output" &&\n'> <'\t\techo "untracked"\n'> <'\t} >.gitignore &&\n'> <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t M dir1/modified\n'> <'\tA dir2/added\n'> <'\tEOF\n'> <'\tgit status -s >output &&\n'> <'\ttest_cmp expect output &&\n'> <'\n'> <'\tcat >expect <<-\\EOF &&\n'> <'\t M dir1/modified\n'> <'\tA dir2/added\n'> <'\t!! .gitignore\n'> <'\t!! dir1/untracked\n'> <'\t!! dir2/modified\n'> <'\t!! dir2/untracked\n'> <'\t!! expect\n'> <'\t!! expect-with-v\n'> <'\t!! output\n'> <'\t!! untracked\n'> <'\tEOF\n'> <'\tgit status -s --ignored >output &&\n'> <'\ttest_cmp expect output &&\n'> <'\n'> <'\tcat >expect <<\\EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tnew file: dir2/added\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Ignored files:\n'> <' (use "git add -f <file>..." to include in what will be committed)\n'> <'\n'> <'\t.gitignore\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\texpect\n'> <'\texpect-with-v\n'> <'\toutput\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\tgit status --ignored >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<.gitignore>}) (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: 633 stdin_parts: [<'.gitignore\n'> <'expect*\n'> <'output*\n'>] ) ) ] do_fork: T ) (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: 651 stdin_parts: [ <'## master\n'> <' M dir1/modified\n'> <'A dir2/added\n'> <'?? dir1/untracked\n'> <'?? dir2/modified\n'> <'?? dir2/untracked\n'> <'?? untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status -s -b'>)} {(SQ <'\n'> <'\n'> <'\tgit status -s -b >output &&\n'> <'\ttest_cmp expect output\n'> <'\n'>)} ) (C {<test_expect_success>} {(SQ <'status -s -z -b'>)} { (SQ <'\n'> <'\ttr "\\\\n" Q <expect >expect.q &&\n'> <'\tmv expect.q expect &&\n'> <'\tgit status -s -z -b >output &&\n'> <'\tnul_to_q <output >output.q &&\n'> <'\tmv output.q output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'setup dir3'>)} {(SQ <'\n'> <'\tmkdir dir3 &&\n'> <'\t: >dir3/untracked1 &&\n'> <'\t: >dir3/untracked2\n'>)} ) (C {<test_expect_success>} {(SQ <'status -uno'>)} { (SQ <'\n'> <'\tcat >expect <<EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tnew file: dir2/added\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files not listed (use -u option to show untracked files)\n'> <'EOF\n'> <'\tgit status -uno >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status (status.showUntrackedFiles no)'>)} { (SQ <'\n'> <'\ttest_config status.showuntrackedfiles no &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status -uno (advice.statusHints false)'>)} { (SQ <'\n'> <'\tcat >expect <<EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <'\tnew file: dir2/added\n'> <'\n'> <'Changes not staged for commit:\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files not listed\n'> <'EOF\n'> <'\ttest_config advice.statusHints false &&\n'> <'\tgit status -uno >output &&\n'> <'\ttest_i18ncmp expect output\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: 777 stdin_parts: [<' M dir1/modified\n'> <'A dir2/added\n'>] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status -s -uno'>)} {(SQ <'\n'> <'\tgit status -s -uno >output &&\n'> <'\ttest_cmp expect output\n'>)} ) (C {<test_expect_success>} {(SQ <'status -s (status.showUntrackedFiles no)'>)} { (SQ <'\n'> <'\tgit config status.showuntrackedfiles no &&\n'> <'\tgit status -s >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status -unormal'>)} { (SQ <'\n'> <'\tcat >expect <<EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tnew file: dir2/added\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tdir3/\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\tgit status -unormal >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status (status.showUntrackedFiles normal)'>)} { (SQ <'\n'> <'\ttest_config status.showuntrackedfiles normal &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output\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: 871 stdin_parts: [ <' M dir1/modified\n'> <'A dir2/added\n'> <'?? dir1/untracked\n'> <'?? dir2/modified\n'> <'?? dir2/untracked\n'> <'?? dir3/\n'> <'?? untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status -s -unormal'>)} {(SQ <'\n'> <'\tgit status -s -unormal >output &&\n'> <'\ttest_cmp expect output\n'>)} ) (C {<test_expect_success>} {(SQ <'status -s (status.showUntrackedFiles normal)'>)} { (SQ <'\n'> <'\tgit config status.showuntrackedfiles normal &&\n'> <'\tgit status -s >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status -uall'>)} { (SQ <'\n'> <'\tcat >expect <<EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tnew file: dir2/added\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tdir3/untracked1\n'> <'\tdir3/untracked2\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\tgit status -uall >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status (status.showUntrackedFiles all)'>)} { (SQ <'\n'> <'\ttest_config status.showuntrackedfiles all &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'teardown dir3'>)} {(SQ <'\n'> <'\trm -rf dir3\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: 977 stdin_parts: [ <' M dir1/modified\n'> <'A dir2/added\n'> <'?? dir1/untracked\n'> <'?? dir2/modified\n'> <'?? dir2/untracked\n'> <'?? untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status -s -uall'>)} { (SQ <'\n'> <'\ttest_unconfig status.showuntrackedfiles &&\n'> <'\tgit status -s -uall >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status -s (status.showUntrackedFiles all)'>)} { (SQ <'\n'> <'\ttest_config status.showuntrackedfiles all &&\n'> <'\tgit status -s >output &&\n'> <'\trm -rf dir3 &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status with relative paths'>)} { (SQ <'\n'> <'\tcat >expect <<\\EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tnew file: ../dir2/added\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: modified\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\tuntracked\n'> <'\t../dir2/modified\n'> <'\t../dir2/untracked\n'> <'\t../untracked\n'> <'\n'> <'EOF\n'> <'\t(cd dir1 && git status) >output &&\n'> <'\ttest_i18ncmp expect output\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: 1056 stdin_parts: [ <' M modified\n'> <'A ../dir2/added\n'> <'?? untracked\n'> <'?? ../dir2/modified\n'> <'?? ../dir2/untracked\n'> <'?? ../untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status -s with relative paths'>)} { (SQ <'\n'> <'\n'> <'\t(cd dir1 && git status -s) >output &&\n'> <'\ttest_cmp expect output\n'> <'\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: 1087 stdin_parts: [ <' M dir1/modified\n'> <'A dir2/added\n'> <'?? dir1/untracked\n'> <'?? dir2/modified\n'> <'?? dir2/untracked\n'> <'?? untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status --porcelain ignores relative paths setting'>)} { (SQ <'\n'> <'\n'> <'\t(cd dir1 && git status --porcelain) >output &&\n'> <'\ttest_cmp expect output\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'setup unique colors'>)} { (SQ <'\n'> <'\n'> <'\tgit config status.color.untracked blue &&\n'> <'\tgit config status.color.branch green\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'status with color.ui'>)} { (SQ <'\n'> <'\tcat >expect <<\\EOF &&\n'> <'On branch <GREEN>master<RESET>\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\t<GREEN>new file: dir2/added<RESET>\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\t<RED>modified: dir1/modified<RESET>\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\t<BLUE>dir1/untracked<RESET>\n'> <'\t<BLUE>dir2/modified<RESET>\n'> <'\t<BLUE>dir2/untracked<RESET>\n'> <'\t<BLUE>untracked<RESET>\n'> <'\n'> <'EOF\n'> <'\ttest_config color.ui always &&\n'> <'\tgit status | test_decode_color >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status with color.status'>)} { (SQ <'\n'> <'\ttest_config color.status always &&\n'> <'\tgit status | test_decode_color >output &&\n'> <'\ttest_i18ncmp expect output\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: 1184 stdin_parts: [ <' <RED>M<RESET> dir1/modified\n'> <'<GREEN>A<RESET> dir2/added\n'> <'<BLUE>??<RESET> dir1/untracked\n'> <'<BLUE>??<RESET> dir2/modified\n'> <'<BLUE>??<RESET> dir2/untracked\n'> <'<BLUE>??<RESET> untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status -s with color.ui'>)} { (SQ <'\n'> <'\n'> <'\tgit config color.ui always &&\n'> <'\tgit status -s | test_decode_color >output &&\n'> <'\ttest_cmp expect output\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'status -s with color.status'>)} { (SQ <'\n'> <'\n'> <'\tgit config --unset color.ui &&\n'> <'\tgit config color.status always &&\n'> <'\tgit status -s | test_decode_color >output &&\n'> <'\ttest_cmp expect output\n'> <'\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: 1235 stdin_parts: [ <'## <GREEN>master<RESET>\n'> <' <RED>M<RESET> dir1/modified\n'> <'<GREEN>A<RESET> dir2/added\n'> <'<BLUE>??<RESET> dir1/untracked\n'> <'<BLUE>??<RESET> dir2/modified\n'> <'<BLUE>??<RESET> dir2/untracked\n'> <'<BLUE>??<RESET> untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status -s -b with color.status'>)} { (SQ <'\n'> <'\n'> <'\tgit status -s -b | test_decode_color >output &&\n'> <'\ttest_cmp expect output\n'> <'\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: 1267 stdin_parts: [ <' M dir1/modified\n'> <'A dir2/added\n'> <'?? dir1/untracked\n'> <'?? dir2/modified\n'> <'?? dir2/untracked\n'> <'?? untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status --porcelain ignores color.ui'>)} { (SQ <'\n'> <'\n'> <'\tgit config --unset color.status &&\n'> <'\tgit config color.ui always &&\n'> <'\tgit status --porcelain | test_decode_color >output &&\n'> <'\ttest_cmp expect output\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'status --porcelain ignores color.status'>)} { (SQ <'\n'> <'\n'> <'\tgit config --unset color.ui &&\n'> <'\tgit config color.status always &&\n'> <'\tgit status --porcelain | test_decode_color >output &&\n'> <'\ttest_cmp expect output\n'> <'\n'> ) } ) (C {<git>} {<config>} {<--unset>} {<color.status>}) (C {<git>} {<config>} {<--unset>} {<color.ui>}) (C {<test_expect_success>} {(SQ <'status --porcelain respects -b'>)} { (SQ <'\n'> <'\n'> <'\tgit status --porcelain -b >output &&\n'> <'\t{\n'> <'\t\techo "## master" &&\n'> <'\t\tcat expect\n'> <'\t} >tmp &&\n'> <'\tmv tmp expect &&\n'> <'\ttest_cmp expect output\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'status without relative paths'>)} { (SQ <'\n'> <'\tcat >expect <<\\EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tnew file: dir2/added\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\ttest_config status.relativePaths false &&\n'> <'\t(cd dir1 && git status) >output &&\n'> <'\ttest_i18ncmp expect output\n'> <'\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: 1397 stdin_parts: [ <' M dir1/modified\n'> <'A dir2/added\n'> <'?? dir1/untracked\n'> <'?? dir2/modified\n'> <'?? dir2/untracked\n'> <'?? untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status -s without relative paths'>)} { (SQ <'\n'> <'\n'> <'\ttest_config status.relativePaths false &&\n'> <'\t(cd dir1 && git status -s) >output &&\n'> <'\ttest_cmp expect output\n'> <'\n'> ) } ) (C {<test_expect_success>} {(SQ <'dry-run of partial commit excluding new file in index'>)} { (SQ <'\n'> <'\tcat >expect <<EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\tdir1/untracked\n'> <'\tdir2/\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\tgit commit --dry-run dir1/modified >output &&\n'> <'\ttest_i18ncmp expect output\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: 1455 stdin_parts: [ <':100644 100644 '> ($ Id.VSub_DollarName '$EMPTY_BLOB') <' 0000000000000000000000000000000000000000 M\tdir1/modified\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status refreshes the index'>)} { (SQ <'\n'> <'\ttouch dir2/added &&\n'> <'\tgit status &&\n'> <'\tgit diff-files >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'setup status submodule summary'>)} { (SQ <'\n'> <'\ttest_create_repo sm && (\n'> <'\t\tcd sm &&\n'> <'\t\t>foo &&\n'> <'\t\tgit add foo &&\n'> <'\t\tgit commit -m "Add foo"\n'> <'\t) &&\n'> <'\tgit add sm\n'> ) } ) (C {<test_expect_success>} {(SQ <'status submodule summary is disabled by default'>)} { (SQ <'\n'> <'\tcat >expect <<EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tnew file: dir2/added\n'> <'\tnew file: sm\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status --untracked-files=all does not show submodule'>)} { (SQ <'\n'> <'\tgit status --untracked-files=all >output &&\n'> <'\ttest_i18ncmp expect output\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: 1557 stdin_parts: [ <' M dir1/modified\n'> <'A dir2/added\n'> <'A sm\n'> <'?? dir1/untracked\n'> <'?? dir2/modified\n'> <'?? dir2/untracked\n'> <'?? untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status -s submodule summary is disabled by default'>)} {(SQ <'\n'> <'\tgit status -s >output &&\n'> <'\ttest_cmp expect output\n'>)} ) (C {<test_expect_success>} {(SQ <'status -s --untracked-files=all does not show submodule'>)} { (SQ <'\n'> <'\tgit status -s --untracked-files=all >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:head) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<cd>} {<sm>}) (C {<git>} {<rev-parse>} {<--short> <Id.Lit_Equals '='> <7>} {<--verify>} {<HEAD>}) ] ) ) } spids: [1587] ) ] ) (C {<test_expect_success>} {(SQ <'status submodule summary'>)} { (SQ <'\n'> <'\tcat >expect <<EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tnew file: dir2/added\n'> <'\tnew file: sm\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Submodule changes to be committed:\n'> <'\n'> <'* sm 0000000...$head (1):\n'> <' > Add foo\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\tgit config status.submodulesummary 10 &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'status submodule summary with status.displayCommentPrefix=false'>)} { (SQ <'\n'> <'\tstrip_comments expect &&\n'> <'\tgit -c status.displayCommentPrefix=false status >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'commit with submodule summary ignores status.displayCommentPrefix'>)} {(SQ <'\n'> <'\tcommit_template_commented\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: 1693 stdin_parts: [ <' M dir1/modified\n'> <'A dir2/added\n'> <'A sm\n'> <'?? dir1/untracked\n'> <'?? dir2/modified\n'> <'?? dir2/untracked\n'> <'?? untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status -s submodule summary'>)} {(SQ <'\n'> <'\tgit status -s >output &&\n'> <'\ttest_cmp expect output\n'>)} ) (C {<test_expect_success>} {(SQ <'status submodule summary (clean submodule): commit'>)} { (SQ <'\n'> <'\tcat >expect <<EOF &&\n'> <'On branch master\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tuntracked\n'> <'\n'> <'no changes added to commit (use "git add" and/or "git commit -a")\n'> <'EOF\n'> <'\tgit commit -m "commit submodule" &&\n'> <'\tgit config status.submodulesummary 10 &&\n'> <'\ttest_must_fail git commit --dry-run >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output\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: 1756 stdin_parts: [ <' M dir1/modified\n'> <'?? dir1/untracked\n'> <'?? dir2/modified\n'> <'?? dir2/untracked\n'> <'?? untracked\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(SQ <'status -s submodule summary (clean submodule)'>)} {(SQ <'\n'> <'\tgit status -s >output &&\n'> <'\ttest_cmp expect output\n'>)} ) (C {<test_expect_success>} {(SQ <'status -z implies porcelain'>)} { (SQ <'\n'> <'\tgit status --porcelain |\n'> <'\tperl -pe "s/\\012/\\000/g" >expect &&\n'> <'\tgit status -z >output &&\n'> <'\ttest_cmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'commit --dry-run submodule summary (--amend)'>)} { (SQ <'\n'> <'\tcat >expect <<EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD^1 <file>..." to unstage)\n'> <'\n'> <'\tnew file: dir2/added\n'> <'\tnew file: sm\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Submodule changes to be committed:\n'> <'\n'> <'* sm 0000000...$head (1):\n'> <' > Add foo\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\tgit config status.submodulesummary 10 &&\n'> <'\tgit commit --dry-run --amend >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {<POSIXPERM> <Id.Lit_Comma ','> <SANITY>} {(SQ <'status succeeds in a read-only repository'>)} { (SQ <'\n'> <'\t(\n'> <'\t\tchmod a-w .git &&\n'> <'\t\t# make dir1/tracked stat-dirty\n'> <'\t\t>dir1/tracked1 && mv -f dir1/tracked1 dir1/tracked &&\n'> <'\t\tgit status -s >output &&\n'> <'\t\t! grep dir1/tracked output &&\n'> <'\t\t# make sure "status" succeeded without writing index out\n'> <'\t\tgit diff-files | grep dir1/tracked\n'> <'\t)\n'> <'\tstatus=$?\n'> <'\tchmod 775 .git\n'> <'\t(exit $status)\n'> ) } ) (command.AndOr ops: [Id.Op_DAmp] children: [ (command.Subshell child: (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp] children: [ (C {<cd>} {<sm>}) (command.Simple words: [{<echo>}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<bar>})] do_fork: T ) (C {<git>} {<add>} {<bar>}) (C {<git>} {<commit>} {<-q>} {<-m>} {(SQ <'Add bar'>)}) ] ) ) (C {<git>} {<add>} {<sm>}) ] ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:new_head) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.AndOr ops: [Id.Op_DAmp] children: [ (C {<cd>} {<sm>}) (C {<git>} {<rev-parse>} {<--short> <Id.Lit_Equals '='> <7>} {<--verify>} {<HEAD>}) ] ) ) } spids: [1898] ) ] ) (C {<touch>} {<.gitmodules>}) (C {<test_expect_success>} {(SQ <'--ignore-submodules=untracked suppresses submodules with untracked content'>)} { (SQ <'\n'> <'\tcat > expect << EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tmodified: sm\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Submodule changes to be committed:\n'> <'\n'> <'* sm $head...$new_head (1):\n'> <' > Add bar\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\t.gitmodules\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\techo modified sm/untracked &&\n'> <'\tgit status --ignore-submodules=untracked >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'.gitmodules ignore=untracked suppresses submodules with untracked content'>)} { (SQ <'\n'> <'\ttest_config diff.ignoreSubmodules dirty &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore untracked &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (C {<test_expect_success>} {(SQ <'.git/config ignore=untracked suppresses submodules with untracked content'>)} { (SQ <'\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore none &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit config --add submodule.subname.ignore untracked &&\n'> <'\tgit config --add submodule.subname.path sm &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config --remove-section submodule.subname &&\n'> <'\tgit config --remove-section -f .gitmodules submodule.subname\n'> ) } ) (C {<test_expect_success>} {(SQ <'--ignore-submodules=dirty suppresses submodules with untracked content'>)} { (SQ <'\n'> <'\tgit status --ignore-submodules=dirty >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'.gitmodules ignore=dirty suppresses submodules with untracked content'>)} { (SQ <'\n'> <'\ttest_config diff.ignoreSubmodules dirty &&\n'> <'\tgit status >output &&\n'> <'\t! test -s actual &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore dirty &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (C {<test_expect_success>} {(SQ <'.git/config ignore=dirty suppresses submodules with untracked content'>)} { (SQ <'\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore none &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit config --add submodule.subname.ignore dirty &&\n'> <'\tgit config --add submodule.subname.path sm &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config --remove-section submodule.subname &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (C {<test_expect_success>} {(SQ <'--ignore-submodules=dirty suppresses submodules with modified content'>)} { (SQ <'\n'> <'\techo modified >sm/foo &&\n'> <'\tgit status --ignore-submodules=dirty >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'.gitmodules ignore=dirty suppresses submodules with modified content'>)} { (SQ <'\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore dirty &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (C {<test_expect_success>} {(SQ <'.git/config ignore=dirty suppresses submodules with modified content'>)} { (SQ <'\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore none &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit config --add submodule.subname.ignore dirty &&\n'> <'\tgit config --add submodule.subname.path sm &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config --remove-section submodule.subname &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (C {<test_expect_success>} {(DQ <'--ignore-submodules=untracked doesn\'t suppress submodules with modified content'>)} { (SQ <'\n'> <'\tcat > expect << EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tmodified: sm\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <' (commit or discard the untracked or modified content in submodules)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\tmodified: sm (modified content)\n'> <'\n'> <'Submodule changes to be committed:\n'> <'\n'> <'* sm $head...$new_head (1):\n'> <' > Add bar\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\t.gitmodules\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\tgit status --ignore-submodules=untracked > output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(DQ <'.gitmodules ignore=untracked doesn\'t suppress submodules with modified content'>)} { (SQ <'\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore untracked &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (C {<test_expect_success>} {(DQ <'.git/config ignore=untracked doesn\'t suppress submodules with modified content'>)} { (SQ <'\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore none &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit config --add submodule.subname.ignore untracked &&\n'> <'\tgit config --add submodule.subname.path sm &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config --remove-section submodule.subname &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:head2) op: assign_op.Equal rhs: { (command_sub left_token: <Id.Left_DollarParen '$('> child: (command.AndOr ops: [Id.Op_DAmp Id.Op_DAmp] children: [ (C {<cd>} {<sm>}) (C {<git>} {<commit>} {<-q>} {<-m>} {(DQ <'2nd commit'>)} {<foo>}) (C {<git>} {<rev-parse>} {<--short> <Id.Lit_Equals '='> <7>} {<--verify>} {<HEAD>}) ] ) ) } spids: [2182] ) ] ) (C {<test_expect_success>} {(DQ <'--ignore-submodules=untracked doesn\'t suppress submodule summary'>)} { (SQ <'\n'> <'\tcat > expect << EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tmodified: sm\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\tmodified: sm (new commits)\n'> <'\n'> <'Submodule changes to be committed:\n'> <'\n'> <'* sm $head...$new_head (1):\n'> <' > Add bar\n'> <'\n'> <'Submodules changed but not updated:\n'> <'\n'> <'* sm $new_head...$head2 (1):\n'> <' > 2nd commit\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\t.gitmodules\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\tgit status --ignore-submodules=untracked > output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(DQ <'.gitmodules ignore=untracked doesn\'t suppress submodule summary'>)} { (SQ <'\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore untracked &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (C {<test_expect_success>} {(DQ <'.git/config ignore=untracked doesn\'t suppress submodule summary'>)} { (SQ <'\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore none &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit config --add submodule.subname.ignore untracked &&\n'> <'\tgit config --add submodule.subname.path sm &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config --remove-section submodule.subname &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (C {<test_expect_success>} {(DQ <'--ignore-submodules=dirty doesn\'t suppress submodule summary'>)} { (SQ <'\n'> <'\tgit status --ignore-submodules=dirty > output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(DQ <'.gitmodules ignore=dirty doesn\'t suppress submodule summary'>)} { (SQ <'\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore dirty &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (C {<test_expect_success>} {(DQ <'.git/config ignore=dirty doesn\'t suppress submodule summary'>)} { (SQ <'\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore none &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit config --add submodule.subname.ignore dirty &&\n'> <'\tgit config --add submodule.subname.path sm &&\n'> <'\tgit status >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config --remove-section submodule.subname &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\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: 2416 stdin_parts: [ <'; On branch master\n'> <'; Changes to be committed:\n'> <'; (use '> <Id.Right_DoubleQuote '"'> <'git reset HEAD <file>...'> <Id.Right_DoubleQuote '"'> <' to unstage)\n'> <';\n'> <';\tmodified: sm\n'> <';\n'> <'; Changes not staged for commit:\n'> <'; (use '> <Id.Right_DoubleQuote '"'> <'git add <file>...'> <Id.Right_DoubleQuote '"'> <' to update what will be committed)\n'> <'; (use '> <Id.Right_DoubleQuote '"'> <'git checkout -- <file>...'> <Id.Right_DoubleQuote '"'> <' to discard changes in working directory)\n'> <';\n'> <';\tmodified: dir1/modified\n'> <';\tmodified: sm (new commits)\n'> <';\n'> <'; Submodule changes to be committed:\n'> <';\n'> <'; * sm '> ($ Id.VSub_DollarName '$head') <...> ($ Id.VSub_DollarName '$new_head') <' (1):\n'> <'; > Add bar\n'> <';\n'> <'; Submodules changed but not updated:\n'> <';\n'> <'; * sm '> ($ Id.VSub_DollarName '$new_head') <...> ($ Id.VSub_DollarName '$head2') <' (1):\n'> <'; > 2nd commit\n'> <';\n'> <'; Untracked files:\n'> <'; (use '> <Id.Right_DoubleQuote '"'> <'git add <file>...'> <Id.Right_DoubleQuote '"'> <' to include in what will be committed)\n'> <';\n'> <';\t.gitmodules\n'> <';\tdir1/untracked\n'> <';\tdir2/modified\n'> <';\tdir2/untracked\n'> <';\tuntracked\n'> <';\n'> ] ) ) ] do_fork: T ) (C {<test_expect_success>} {(DQ <'status (core.commentchar with submodule summary)'>)} { (SQ <'\n'> <'\ttest_config core.commentchar ";" &&\n'> <'\tgit -c status.displayCommentPrefix=true status >output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(DQ <'status (core.commentchar with two chars with submodule summary)'>)} { (SQ <'\n'> <'\ttest_config core.commentchar ";;" &&\n'> <'\ttest_must_fail git -c status.displayCommentPrefix=true status\n'> ) } ) (C {<test_expect_success>} {(DQ <'--ignore-submodules=all suppresses submodule summary'>)} { (SQ <'\n'> <'\tcat > expect << EOF &&\n'> <'On branch master\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\t.gitmodules\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tuntracked\n'> <'\n'> <'no changes added to commit (use "git add" and/or "git commit -a")\n'> <'EOF\n'> <'\tgit status --ignore-submodules=all > output &&\n'> <'\ttest_i18ncmp expect output\n'> ) } ) (C {<test_expect_success>} {(SQ <'.gitmodules ignore=all suppresses unstaged submodule summary'>)} { (SQ <'\n'> <'\tcat > expect << EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tmodified: sm\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files:\n'> <' (use "git add <file>..." to include in what will be committed)\n'> <'\n'> <'\t.gitmodules\n'> <'\tdir1/untracked\n'> <'\tdir2/modified\n'> <'\tdir2/untracked\n'> <'\tuntracked\n'> <'\n'> <'EOF\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore all &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit status > output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (C {<test_expect_success>} {(SQ <'.git/config ignore=all suppresses unstaged submodule summary'>)} { (SQ <'\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore none &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit config --add submodule.subname.ignore all &&\n'> <'\tgit config --add submodule.subname.path sm &&\n'> <'\tgit status > output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit config --remove-section submodule.subname &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (C {<test_expect_success>} {(SQ <'setup of test environment'>)} { (SQ <'\n'> <'\tgit config status.showUntrackedFiles no &&\n'> <'\tgit status -s >expected_short &&\n'> <'\tgit status --no-short >expected_noshort\n'> ) } ) (C {<test_expect_success>} {(SQ <'"status.short=true" same as "-s"'>)} { (SQ <'\n'> <'\tgit -c status.short=true status >actual &&\n'> <'\ttest_cmp expected_short actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'"status.short=true" weaker than "--no-short"'>)} { (SQ <'\n'> <'\tgit -c status.short=true status --no-short >actual &&\n'> <'\ttest_cmp expected_noshort actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'"status.short=false" same as "--no-short"'>)} { (SQ <'\n'> <'\tgit -c status.short=false status >actual &&\n'> <'\ttest_cmp expected_noshort actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'"status.short=false" weaker than "-s"'>)} { (SQ <'\n'> <'\tgit -c status.short=false status -s >actual &&\n'> <'\ttest_cmp expected_short actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'"status.branch=true" same as "-b"'>)} { (SQ <'\n'> <'\tgit status -sb >expected_branch &&\n'> <'\tgit -c status.branch=true status -s >actual &&\n'> <'\ttest_cmp expected_branch actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'"status.branch=true" different from "--no-branch"'>)} { (SQ <'\n'> <'\tgit status -s --no-branch >expected_nobranch &&\n'> <'\tgit -c status.branch=true status -s >actual &&\n'> <'\ttest_must_fail test_cmp expected_nobranch actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'"status.branch=true" weaker than "--no-branch"'>)} { (SQ <'\n'> <'\tgit -c status.branch=true status -s --no-branch >actual &&\n'> <'\ttest_cmp expected_nobranch actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'"status.branch=true" weaker than "--porcelain"'>)} { (SQ <'\n'> <' git -c status.branch=true status --porcelain >actual &&\n'> <' test_cmp expected_nobranch actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'"status.branch=false" same as "--no-branch"'>)} { (SQ <'\n'> <'\tgit -c status.branch=false status -s >actual &&\n'> <'\ttest_cmp expected_nobranch actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'"status.branch=false" weaker than "-b"'>)} { (SQ <'\n'> <'\tgit -c status.branch=false status -sb >actual &&\n'> <'\ttest_cmp expected_branch actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'Restore default test environment'>)} {(SQ <'\n'> <'\tgit config --unset status.showUntrackedFiles\n'>)} ) (C {<test_expect_success>} {(SQ <'git commit will commit a staged but ignored submodule'>)} { (SQ <'\n'> <'\tgit config --add -f .gitmodules submodule.subname.ignore all &&\n'> <'\tgit config --add -f .gitmodules submodule.subname.path sm &&\n'> <'\tgit config --add submodule.subname.ignore all &&\n'> <'\tgit status -s --ignore-submodules=dirty >output &&\n'> <'\ttest_i18ngrep "^M. sm" output &&\n'> <'\tGIT_EDITOR="echo hello >>\\"\\$1\\"" &&\n'> <'\texport GIT_EDITOR &&\n'> <'\tgit commit -uno &&\n'> <'\tgit status -s --ignore-submodules=dirty >output &&\n'> <'\ttest_i18ngrep ! "^M. sm" output\n'> ) } ) (C {<test_expect_success>} {(SQ <'git commit --dry-run will show a staged but ignored submodule'>)} { (SQ <'\n'> <'\tgit reset HEAD^ &&\n'> <'\tgit add sm &&\n'> <'\tcat >expect << EOF &&\n'> <'On branch master\n'> <'Changes to be committed:\n'> <' (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tmodified: sm\n'> <'\n'> <'Changes not staged for commit:\n'> <' (use "git add <file>..." to update what will be committed)\n'> <' (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified: dir1/modified\n'> <'\n'> <'Untracked files not listed (use -u option to show untracked files)\n'> <'EOF\n'> <'\tgit commit -uno --dry-run >output &&\n'> <'\ttest_i18ncmp expect output &&\n'> <'\tgit status -s --ignore-submodules=dirty >output &&\n'> <'\ttest_i18ngrep "^M. sm" output\n'> ) } ) (C {<test_expect_success>} {(SQ <'git commit -m will commit a staged but ignored submodule'>)} { (SQ <'\n'> <'\tgit commit -uno -m message &&\n'> <'\tgit status -s --ignore-submodules=dirty >output &&\n'> <'\t test_i18ngrep ! "^M. sm" output &&\n'> <'\tgit config --remove-section submodule.subname &&\n'> <'\tgit config -f .gitmodules --remove-section submodule.subname\n'> ) } ) (C {<test_done>}) ] )