(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: { (SQ <"git update-index on filesystem w/o symlinks test.\n"> <"\n"> <"This tests that git update-index keeps the symbolic link property\n"> <"even if a plain file is in the working tree if core.symlinks is false."> ) } spids: [13] ) ] spids: [13] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ <preparation>)} { (SQ <"\n"> <"git config core.symlinks false &&\n"> <"l=$(printf file | git hash-object -t blob -w --stdin) &&\n"> <"echo \"120000 $l\tsymlink\" | git update-index --index-info"> ) } ) (C {(test_expect_success)} {(SQ <"modify the symbolic link">)} {(SQ <"\n"> <"printf new-file > symlink &&\n"> <"git update-index symlink">)} ) (C {(test_expect_success)} {(SQ <"the index entry must still be a symbolic link">)} { (SQ <"\n"> <"case \"$(git ls-files --stage --cached symlink)\" in\n"> <"120000\" \"*symlink) echo pass;;\n"> <"*) echo fail; git ls-files --stage --cached symlink; (exit 1);;\n"> <esac> ) } ) (C {(test_done)}) ] )