(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"git status">)} spids: [13] ) ] 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"> ) } ) (FuncDef name: strip_comments body: (BraceGroup children: [ (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:tab) op:Equal rhs:{(SQ <"\t">)} spids:[117])] spids: [117] ) (AndOr children: [ (SimpleCommand words: [ {(sed)} { (DQ ("s/^") (EscapedLiteralPart token:<Lit_EscapedChar "\\#">) (" //; s/^") (EscapedLiteralPart token:<Lit_EscapedChar "\\#">) (Lit_Other "$") ("//; s/^#") ($ VSub_Name "$tab") (/) ($ VSub_Name "$tab") (/) ) } ] redirects: [ (Redir op_id: Redir_Less fd: -1 arg_word: {(DQ ($ VSub_Number "$1"))} spids: [138] ) (Redir op_id: Redir_Great fd: -1 arg_word: {(DQ ($ VSub_Number "$1")) (.tmp)} spids: [143] ) ] ) (AndOr children: [ (C {(rm)} {(DQ ($ VSub_Number "$1"))}) (C {(mv)} {(DQ ($ VSub_Number "$1")) (.tmp)} {(DQ ($ VSub_Number "$1"))}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] spids: [114] ) spids: [109 113] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(.gitignore)} spids:[176]) (HereDoc op_id: Redir_DLess fd: -1 body: {(".gitignore\n") ("expect*\n") ("output*\n")} do_expansion: False here_end: EOF was_filled: True spids: [179] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[233]) (HereDoc op_id: Redir_DLess fd: -1 body: {("# 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_expansion: False here_end: EOF was_filled: True spids: [236] ) ] ) (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"> ) } ) (FuncDef name: commit_template_commented body: (BraceGroup children: [ (AndOr children: [ (Subshell child: (AndOr children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:EDITOR) op: Equal rhs: {(.git/editor)} spids: [328] ) ] spids: [328] ) (AndOr children: [(C {(export)} {(EDITOR)}) (C {(test_must_fail)} {(git)} {(commit)})] op_id: Op_DAmp ) ] op_id: Op_DAmp ) spids: [325 352] ) (Pipeline children: [(C {(grep)} {(SQ <"^[^#]">)} {(output)})] negated: True ) ] op_id: Op_DAmp ) ] spids: [322] ) spids: [317 321] ) (C {(test_expect_success)} {(SQ <"commit ignores status.displayCommentPrefix=false in COMMIT_EDITMSG">)} {(SQ <"\n"> <"\tcommit_template_commented\n">)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[384]) (HereDoc op_id: Redir_DLess fd: -1 body: {("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_expansion: False here_end: EOF was_filled: True spids: [387] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[409]) (HereDoc op_id: Redir_DLess fd: -1 body: {(" M dir1/modified\n") ("A dir2/added\n") ("?? dir1/untracked\n") ("?? dir2/modified\n") ("?? dir2/untracked\n") ("?? untracked\n") } do_expansion: False here_end: EOF was_filled: True spids: [412] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(.gitignore)} spids:[576]) (HereDoc op_id: Redir_DLess fd: -1 body: {(".gitignore\n") ("expect*\n") ("output*\n")} do_expansion: False here_end: EOF was_filled: True spids: [579] ) ] ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[586]) (HereDoc op_id: Redir_DLess fd: -1 body: {("## master\n") (" M dir1/modified\n") ("A dir2/added\n") ("?? dir1/untracked\n") ("?? dir2/modified\n") ("?? dir2/untracked\n") ("?? untracked\n") } do_expansion: False here_end: EOF was_filled: True spids: [589] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[708]) (HereDoc op_id: Redir_DLess fd: -1 body: {(DQ (" M dir1/modified\n") ("A dir2/added\n"))} do_expansion: True here_end: EOF was_filled: True spids: [711] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[796]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ (" M dir1/modified\n") ("A dir2/added\n") ("?? dir1/untracked\n") ("?? dir2/modified\n") ("?? dir2/untracked\n") ("?? dir3/\n") ("?? untracked\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [799] ) ] ) (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">)}) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[901]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ (" M dir1/modified\n") ("A dir2/added\n") ("?? dir1/untracked\n") ("?? dir2/modified\n") ("?? dir2/untracked\n") ("?? untracked\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [904] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[978]) (HereDoc op_id: Redir_DLess fd: -1 body: {(" M modified\n") ("A ../dir2/added\n") ("?? untracked\n") ("?? ../dir2/modified\n") ("?? ../dir2/untracked\n") ("?? ../untracked\n") } do_expansion: False here_end: EOF was_filled: True spids: [981] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1002]) (HereDoc op_id: Redir_DLess fd: -1 body: {(" M dir1/modified\n") ("A dir2/added\n") ("?? dir1/untracked\n") ("?? dir2/modified\n") ("?? dir2/untracked\n") ("?? untracked\n") } do_expansion: False here_end: EOF was_filled: True spids: [1005] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1092]) (HereDoc op_id: Redir_DLess fd: -1 body: {(" <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_expansion: False here_end: EOF was_filled: True spids: [1095] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1135]) (HereDoc op_id: Redir_DLess fd: -1 body: {("## <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_expansion: False here_end: EOF was_filled: True spids: [1138] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1160]) (HereDoc op_id: Redir_DLess fd: -1 body: {(" M dir1/modified\n") ("A dir2/added\n") ("?? dir1/untracked\n") ("?? dir2/modified\n") ("?? dir2/untracked\n") ("?? untracked\n") } do_expansion: False here_end: EOF was_filled: True spids: [1163] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1283]) (HereDoc op_id: Redir_DLess fd: -1 body: {(" M dir1/modified\n") ("A dir2/added\n") ("?? dir1/untracked\n") ("?? dir2/modified\n") ("?? dir2/untracked\n") ("?? untracked\n") } do_expansion: False here_end: EOF was_filled: True spids: [1286] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1337]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ (":100644 100644 ") ($ VSub_Name "$EMPTY_BLOB") (" 0000000000000000000000000000000000000000 M\tdir1/modified\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [1340] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1433]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ (" M dir1/modified\n") ("A dir2/added\n") ("A sm\n") ("?? dir1/untracked\n") ("?? dir2/modified\n") ("?? dir2/untracked\n") ("?? untracked\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [1436] ) ] ) (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"> ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:head) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (C {(cd)} {(sm)}) (C {(git)} {(rev-parse)} {(--short) (Lit_Other "=") (7)} {(--verify)} {(HEAD)}) ] op_id: Op_DAmp ) ] ) left_token: <Left_CommandSub "$("> spids: [1476 1494] ) } spids: [1475] ) ] spids: [1475] ) (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">)} ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1567]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ (" M dir1/modified\n") ("A dir2/added\n") ("A sm\n") ("?? dir1/untracked\n") ("?? dir2/modified\n") ("?? dir2/untracked\n") ("?? untracked\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [1570] ) ] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[1630]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ (" M dir1/modified\n") ("?? dir1/untracked\n") ("?? dir2/modified\n") ("?? dir2/untracked\n") ("?? untracked\n") ) } do_expansion: True here_end: EOF was_filled: True spids: [1633] ) ] ) (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) (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"> ) } ) (AndOr children: [ (Subshell child: (AndOr children: [ (C {(cd)} {(sm)}) (AndOr children: [ (SimpleCommand words: [{(echo)}] redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(bar)} spids:[1747])] ) (AndOr children: [ (C {(git)} {(add)} {(bar)}) (C {(git)} {(commit)} {(-q)} {(-m)} {(SQ <"Add bar">)}) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) spids: [1738 1772] ) (C {(git)} {(add)} {(sm)}) ] op_id: Op_DAmp ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:new_head) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (C {(cd)} {(sm)}) (C {(git)} {(rev-parse)} {(--short) (Lit_Other "=") (7)} {(--verify)} {(HEAD)}) ] op_id: Op_DAmp ) ] ) left_token: <Left_CommandSub "$("> spids: [1783 1801] ) } spids: [1782] ) ] spids: [1782] ) (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"> ) } ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:head2) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (AndOr children: [ (C {(cd)} {(sm)}) (AndOr children: [ (C {(git)} {(commit)} {(-q)} {(-m)} {(DQ ("2nd commit"))} {(foo)}) (C {(git)} {(rev-parse)} {(--short) (Lit_Other "=") (7)} {(--verify)} {(HEAD)} ) ] op_id: Op_DAmp ) ] op_id: Op_DAmp ) ] ) left_token: <Left_CommandSub "$("> spids: [2067 2101] ) } spids: [2066] ) ] spids: [2066] ) (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"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[2235]) (HereDoc op_id: Redir_DLess fd: -1 body: { (DQ ("; On branch master\n") ("; Changes to be committed:\n") ("; (use ") (Right_DoubleQuote "\"") ("git reset HEAD <file>...") (Right_DoubleQuote "\"") (" to unstage)\n") (";\n") (";\tmodified: sm\n") (";\n") ("; Changes not staged for commit:\n") ("; (use ") (Right_DoubleQuote "\"") ("git add <file>...") (Right_DoubleQuote "\"") (" to update what will be committed)\n") ("; (use ") (Right_DoubleQuote "\"") ("git checkout -- <file>...") (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 ") ($ VSub_Name "$head") (...) ($ VSub_Name "$new_head") (" (1):\n") ("; > Add bar\n") (";\n") ("; Submodules changed but not updated:\n") (";\n") ("; * sm ") ($ VSub_Name "$new_head") (...) ($ VSub_Name "$head2") (" (1):\n") ("; > 2nd commit\n") (";\n") ("; Untracked files:\n") ("; (use ") (Right_DoubleQuote "\"") ("git add <file>...") (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_expansion: True here_end: EOF was_filled: True spids: [2239] ) ] ) (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)}) ] )