(command.CommandList children: [ (command.ShAssignment pairs: [ (assign_pair lhs: (sh_lhs_expr.Name name:test_description) op: assign_op.Equal rhs: { (SQ (Token id:Id.Lit_Chars val:'git checkout-index test.\n' span_id:15) (Token id:Id.Lit_Chars val:'\n' span_id:16) (Token id: Id.Lit_Chars val: 'This test registers the following filesystem structure in the\n' span_id: 17 ) (Token id:Id.Lit_Chars val:'cache:\n' span_id:18) (Token id:Id.Lit_Chars val:'\n' span_id:19) (Token id:Id.Lit_Chars val:' path0 - a file\n' span_id:20) (Token id:Id.Lit_Chars val:' path1/file1 - a file in a directory\n' span_id:21) (Token id:Id.Lit_Chars val:'\n' span_id:22) (Token id: Id.Lit_Chars val: 'And then tries to checkout in a work tree that has the following:\n' span_id: 23 ) (Token id:Id.Lit_Chars val:'\n' span_id:24) (Token id: Id.Lit_Chars val: ' path0/file0 - a file in a directory\n' span_id: 25 ) (Token id:Id.Lit_Chars val:' path1 - a file\n' span_id:26) (Token id:Id.Lit_Chars val:'\n' span_id:27) (Token id: Id.Lit_Chars val: 'The git checkout-index command should fail when attempting to checkout\n' span_id: 28 ) (Token id: Id.Lit_Chars val: 'path0, finding it is occupied by a directory, and path1/file1, finding\n' span_id: 29 ) (Token id: Id.Lit_Chars val: 'path1 is occupied by a non-directory. With "-f" flag, it should remove\n' span_id: 30 ) (Token id:Id.Lit_Chars val:'the conflicting paths and succeed.\n' span_id:31) ) } spids: [13] ) ] ) (C {(.)} {(./test-lib.sh)}) (command.Simple words: [{(date)}] redirects: [ (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:41) fd:-1 arg_word:{(path0)}) ] ) (C {(mkdir)} {(path1)}) (command.Simple words: [{(date)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:50) fd: -1 arg_word: {(path1/file1)} ) ] ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git update-index --add various paths.' span_id:59))} {(SQ (Token id:Id.Lit_Chars val:'git update-index --add path0 path1/file1' span_id:65))} ) (C {(rm)} {(-fr)} {(path0)} {(path1)}) (C {(mkdir)} {(path0)}) (command.Simple words: [{(date)}] redirects: [ (redir.Redir op: (Token id:Id.Redir_Great val:'>' span_id:83) fd: -1 arg_word: {(path0/file0)} ) ] ) (command.Simple words: [{(date)}] redirects: [ (redir.Redir op:(Token id:Id.Redir_Great val:'>' span_id:88) fd:-1 arg_word:{(path1)}) ] ) (C {(test_expect_success)} { (SQ (Token id: Id.Lit_Chars val: 'git checkout-index without -f should fail on conflicting work tree.' span_id: 97 ) ) } {(SQ (Token id:Id.Lit_Chars val:'test_must_fail git checkout-index -a' span_id:103))} ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git checkout-index with -f should succeed.' span_id:112))} {(SQ (Token id:Id.Lit_Chars val:'git checkout-index -f -a' span_id:118))} ) (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'git checkout-index conflicting paths.' span_id:127))} {(SQ (Token id:Id.Lit_Chars val:'test -f path0 && test -d path1 && test -f path1/file1' span_id:133))} ) (C {(test_expect_success)} {(SYMLINKS)} {(SQ (Token id:Id.Lit_Chars val:'checkout-index -f twice with --prefix' span_id:142))} { (SQ (Token id:Id.Lit_Chars val:'\n' span_id:146) (Token id:Id.Lit_Chars val:'\tmkdir -p tar/get &&\n' span_id:147) (Token id:Id.Lit_Chars val:'\tln -s tar/get there &&\n' span_id:148) (Token id:Id.Lit_Chars val:'\techo first &&\n' span_id:149) (Token id:Id.Lit_Chars val:'\tgit checkout-index -a -f --prefix=there/ &&\n' span_id:150) (Token id:Id.Lit_Chars val:'\techo second &&\n' span_id:151) (Token id:Id.Lit_Chars val:'\tgit checkout-index -a -f --prefix=there/\n' span_id:152) ) } ) (C {(test_done)}) ] )