(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description) op: assign_op.Equal rhs: {(SQ <'Test git stash --include-untracked'>)} spids: [13] ) ] redirects: [] ) (C {<.>} {<'./test-lib.sh'>}) (C {<test_expect_success>} {(SQ <'stash save --include-untracked some dirty working directory'>)} { (SQ <'\n'> <'\techo 1 > file &&\n'> <'\tgit add file &&\n'> <'\ttest_tick &&\n'> <'\tgit commit -m initial &&\n'> <'\techo 2 > file &&\n'> <'\tgit add file &&\n'> <'\techo 3 > file &&\n'> <'\ttest_tick &&\n'> <'\techo 1 > file2 &&\n'> <'\techo 1 > HEAD &&\n'> <'\tmkdir untracked &&\n'> <'\techo untracked >untracked/untracked &&\n'> <'\tgit stash --include-untracked &&\n'> <'\tgit diff-files --quiet &&\n'> <'\tgit diff-index --cached --quiet HEAD\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: 62 stdin_parts: [<'?? actual\n'> <'?? expect\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'stash save --include-untracked cleaned the untracked files'>)} {(SQ <'\n'> <'\tgit status --porcelain >actual &&\n'> <'\ttest_cmp expect actual\n'>)} ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect.diff>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 108 stdin_parts: [ <'diff --git a/HEAD b/HEAD\n'> <'new file mode 100644\n'> <'index 0000000..d00491f\n'> <'--- /dev/null\n'> <'+++ b/HEAD\n'> <'@@ -0,0 +1 @@\n'> <'+1\n'> <'diff --git a/file2 b/file2\n'> <'new file mode 100644\n'> <'index 0000000..d00491f\n'> <'--- /dev/null\n'> <'+++ b/file2\n'> <'@@ -0,0 +1 @@\n'> <'+1\n'> <'diff --git a/untracked/untracked b/untracked/untracked\n'> <'new file mode 100644\n'> <'index 0000000..5a72eb2\n'> <'--- /dev/null\n'> <'+++ b/untracked/untracked\n'> <'@@ -0,0 +1 @@\n'> <'+untracked\n'> ] ) ) ] more_env: [] do_fork: T ) (command.Simple words: [{<cat>}] redirects: [ (redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<expect.lstree>}) (redir op: <Id.Redir_DLess '<<'> loc: (redir_loc.Fd fd:0) arg: (redir_param.HereDoc here_begin: {<EOF>} here_end_span_id: 122 stdin_parts: [<'HEAD\n'> <'file2\n'> <'untracked\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'stash save --include-untracked stashed the untracked files'>)} { (SQ <'\n'> <'\ttest_path_is_missing file2 &&\n'> <'\ttest_path_is_missing untracked &&\n'> <'\ttest_path_is_missing HEAD &&\n'> <'\tgit diff HEAD stash^3 -- HEAD file2 untracked >actual &&\n'> <'\ttest_cmp expect.diff actual &&\n'> <'\tgit ls-tree --name-only stash^3: >actual &&\n'> <'\ttest_cmp expect.lstree actual\n'> ) } ) (C {<test_expect_success>} {(SQ <'stash save --patch --include-untracked fails'>)} {(SQ <'\n'> <'\ttest_must_fail git stash --patch --include-untracked\n'>)} ) (C {<test_expect_success>} {(SQ <'stash save --patch --all fails'>)} {(SQ <'\n'> <'\ttest_must_fail git stash --patch --all\n'>)} ) (C {<git>} {<clean>} {<--force>} {<--quiet>}) (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: 190 stdin_parts: [ <' M file\n'> <'?? HEAD\n'> <'?? actual\n'> <'?? expect\n'> <'?? file2\n'> <'?? untracked/\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'stash pop after save --include-untracked leaves files untracked again'>)} { (SQ <'\n'> <'\tgit stash pop &&\n'> <'\tgit status --porcelain >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\ttest "1" = "$(cat file2)" &&\n'> <'\ttest untracked = "$(cat untracked/untracked)"\n'> ) } ) (C {<git>} {<clean>} {<--force>} {<--quiet>} {<-d>}) (C {<test_expect_success>} {(SQ <'stash save -u dirty index'>)} { (SQ <'\n'> <'\techo 4 > file3 &&\n'> <'\tgit add file3 &&\n'> <'\ttest_tick &&\n'> <'\tgit stash -u\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: 251 stdin_parts: [ <'diff --git a/file3 b/file3\n'> <'new file mode 100644\n'> <'index 0000000..b8626c4\n'> <'--- /dev/null\n'> <'+++ b/file3\n'> <'@@ -0,0 +1 @@\n'> <'+4\n'> ] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'stash save --include-untracked dirty index got stashed'>)} { (SQ <'\n'> <'\tgit stash pop --index &&\n'> <'\tgit diff --cached >actual &&\n'> <'\ttest_cmp expect actual\n'> ) } ) (command.Simple words: [{<git>} {<reset>}] redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<'/dev/null'>})] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'stash save --include-untracked -q is quiet'>)} { (SQ <'\n'> <'\techo 1 > file5 &&\n'> <'\tgit stash save --include-untracked --quiet > .git/stash-output.out 2>&1 &&\n'> <'\ttest_line_count = 0 .git/stash-output.out &&\n'> <'\trm -f .git/stash-output.out\n'> ) } ) (C {<test_expect_success>} {(SQ <'stash save --include-untracked removed files'>)} { (SQ <'\n'> <'\trm -f file &&\n'> <'\tgit stash save --include-untracked &&\n'> <'\techo 1 > expect &&\n'> <'\ttest_cmp file expect\n'> ) } ) (C {<rm>} {<-f>} {<expect>}) (C {<test_expect_success>} {(SQ <'stash save --include-untracked removed files got stashed'>)} {(SQ <'\n'> <'\tgit stash pop &&\n'> <'\ttest_path_is_missing file\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: {<EOF>} here_end_span_id: 342 stdin_parts: [<'.gitignore\n'> <'ignored\n'> <'ignored.d/\n'>] ) ) ] more_env: [] do_fork: T ) (C {<test_expect_success>} {(SQ <'stash save --include-untracked respects .gitignore'>)} { (SQ <'\n'> <'\techo ignored > ignored &&\n'> <'\tmkdir ignored.d &&\n'> <'\techo ignored >ignored.d/untracked &&\n'> <'\tgit stash -u &&\n'> <'\ttest -s ignored &&\n'> <'\ttest -s ignored.d/untracked &&\n'> <'\ttest -s .gitignore\n'> ) } ) (C {<test_expect_success>} {(SQ <'stash save -u can stash with only untracked files different'>)} { (SQ <'\n'> <'\techo 4 > file4 &&\n'> <'\tgit stash -u &&\n'> <'\ttest_path_is_missing file4\n'>) } ) (C {<test_expect_success>} {(SQ <'stash save --all does not respect .gitignore'>)} { (SQ <'\n'> <'\tgit stash -a &&\n'> <'\ttest_path_is_missing ignored &&\n'> <'\ttest_path_is_missing ignored.d &&\n'> <'\ttest_path_is_missing .gitignore\n'> ) } ) (C {<test_expect_success>} {(SQ <'stash save --all is stash poppable'>)} { (SQ <'\n'> <'\tgit stash pop &&\n'> <'\ttest -s ignored &&\n'> <'\ttest -s ignored.d/untracked &&\n'> <'\ttest -s .gitignore\n'> ) } ) (C {<test_done>}) ] )