(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"unpack-trees error messages">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ <setup>)} { (SQ <"\n"> <"\techo one >one &&\n"> <"\tgit add one &&\n"> <"\tgit commit -a -m First &&\n"> <"\n"> <"\tgit checkout -b branch &&\n"> <"\techo two >two &&\n"> <"\techo three >three &&\n"> <"\techo four >four &&\n"> <"\techo five >five &&\n"> <"\tgit add two three four five &&\n"> <"\tgit commit -m Second &&\n"> <"\n"> <"\tgit checkout master &&\n"> <"\techo other >two &&\n"> <"\techo other >three &&\n"> <"\techo other >four &&\n"> <"\techo other >five\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[46]) (HereDoc op_id: Redir_DLess fd: -1 body: {("error: The following untracked working tree files would be overwritten by merge:\n") ("\tfive\n") ("\tfour\n") ("\tthree\n") ("\ttwo\n") ("Please move or remove them before you merge.\n") ("Aborting\n") } do_expansion: False here_end: EOF was_filled: True spids: [49] ) ] ) (C {(test_expect_success)} {(SQ <"untracked files overwritten by merge (fast and non-fast forward)">)} { (SQ <"\n"> <"\ttest_must_fail git merge branch 2>out &&\n"> <"\ttest_i18ncmp out expect &&\n"> <"\tgit commit --allow-empty -m empty &&\n"> <"\t(\n"> <"\t\tGIT_MERGE_VERBOSITY=0 &&\n"> <"\t\texport GIT_MERGE_VERBOSITY &&\n"> <"\t\ttest_must_fail git merge branch 2>out2\n"> <"\t) &&\n"> <"\ttest_i18ncmp out2 expect &&\n"> <"\tgit reset --hard HEAD^\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[77]) (HereDoc op_id: Redir_DLess fd: -1 body: {("error: Your local changes to the following files would be overwritten by merge:\n") ("\tfour\n") ("\tthree\n") ("\ttwo\n") ("Please commit your changes or stash them before you merge.\n") ( "error: The following untracked working tree files would be overwritten by merge:\n" ) ("\tfive\n") ("Please move or remove them before you merge.\n") ("Aborting\n") } do_expansion: False here_end: EOF was_filled: True spids: [80] ) ] ) (C {(test_expect_success)} {(SQ <"untracked files or local changes ovewritten by merge">)} { (SQ <"\n"> <"\tgit add two &&\n"> <"\tgit add three &&\n"> <"\tgit add four &&\n"> <"\ttest_must_fail git merge branch 2>out &&\n"> <"\ttest_i18ncmp out expect\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[103]) (HereDoc op_id: Redir_DLess fd: -1 body: { ( "error: Your local changes to the following files would be overwritten by checkout:\n" ) ("\trep/one\n") ("\trep/two\n") ("Please commit your changes or stash them before you switch branches.\n") ("Aborting\n") } do_expansion: False here_end: EOF was_filled: True spids: [106] ) ] ) (C {(test_expect_success)} {(SQ <"cannot switch branches because of local changes">)} { (SQ <"\n"> <"\tgit add five &&\n"> <"\tmkdir rep &&\n"> <"\techo one >rep/one &&\n"> <"\techo two >rep/two &&\n"> <"\tgit add rep/one rep/two &&\n"> <"\tgit commit -m Fourth &&\n"> <"\tgit checkout master &&\n"> <"\techo uno >rep/one &&\n"> <"\techo dos >rep/two &&\n"> <"\ttest_must_fail git checkout branch 2>out &&\n"> <"\ttest_i18ncmp out expect\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[135]) (HereDoc op_id: Redir_DLess fd: -1 body: { ( "error: Your local changes to the following files would be overwritten by checkout:\n" ) ("\trep/one\n") ("\trep/two\n") ("Please commit your changes or stash them before you switch branches.\n") ("Aborting\n") } do_expansion: False here_end: EOF was_filled: True spids: [138] ) ] ) (C {(test_expect_success)} {(SQ <"not uptodate file porcelain checkout error">)} { (SQ <"\n"> <"\tgit add rep/one rep/two &&\n"> <"\ttest_must_fail git checkout branch 2>out &&\n"> <"\ttest_i18ncmp out expect\n"> ) } ) (SimpleCommand words: [{(cat)}] redirects: [ (Redir op_id:Redir_Great fd:-1 arg_word:{(expect)} spids:[159]) (HereDoc op_id: Redir_DLess fd: -1 body: {("error: Updating the following directories would lose untracked files in it:\n") ("\trep\n") ("\trep2\n") ("\n") ("Aborting\n") } do_expansion: False here_end: EOF was_filled: True spids: [162] ) ] ) (C {(test_expect_success)} {(SQ <"not_uptodate_dir porcelain checkout error">)} { (SQ <"\n"> <"\tgit init uptodate &&\n"> <"\tcd uptodate &&\n"> <"\tmkdir rep &&\n"> <"\tmkdir rep2 &&\n"> <"\ttouch rep/foo &&\n"> <"\ttouch rep2/foo &&\n"> <"\tgit add rep/foo rep2/foo &&\n"> <"\tgit commit -m init &&\n"> <"\tgit checkout -b branch &&\n"> <"\tgit rm rep -r &&\n"> <"\tgit rm rep2 -r &&\n"> <"\t>rep &&\n"> <"\t>rep2 &&\n"> <"\tgit add rep rep2&&\n"> <"\tgit commit -m \"added test as a file\" &&\n"> <"\tgit checkout master &&\n"> <"\t>rep/untracked-file &&\n"> <"\t>rep2/untracked-file &&\n"> <"\ttest_must_fail git checkout branch 2>out &&\n"> <"\ttest_i18ncmp out ../expect\n"> ) } ) (C {(test_done)}) ] )