(command.CommandList children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:test_description) op: Equal rhs: {(SQ <'Test various path utilities'>)} ) ] ) (C {(.)} {(./test-lib.sh)}) (command.FuncDef name: norm_path body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:expected) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(test-path-utils)} {(print_path)} {(DQ ($ VSub_Number '$2'))}) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (C {(test_expect_success)} {($ VSub_Number '$3')} {(DQ ('normalize path: ') ($ VSub_Number '$1') (' => ') ($ VSub_Number '$2'))} { (DQ ('test ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("(test-path-utils normalize_path_copy '") ($ VSub_Number '$1') ("')") (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (" = '") ($ VSub_DollarName '$expected') ("'") ) } ) ] ) ) (command.FuncDef name: relative_path body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:expected) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (C {(test-path-utils)} {(print_path)} {(DQ ($ VSub_Number '$3'))}) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (C {(test_expect_success)} {($ VSub_Number '$4')} { (DQ ('relative path: ') ($ VSub_Number '$1') (' ') ($ VSub_Number '$2') (' => ') ($ VSub_Number '$3') ) } { (DQ ('test ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("(test-path-utils relative_path '") ($ VSub_Number '$1') ("' '") ($ VSub_Number '$2') ("')") (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (" = '") ($ VSub_DollarName '$expected') ("'") ) } ) ] ) ) (command.FuncDef name: test_submodule_relative_url body: (command.BraceGroup children: [ (C {(test_expect_success)} { (DQ ('test_submodule_relative_url: ') ($ VSub_Number '$1') (' ') ($ VSub_Number '$2') (' ') ($ VSub_Number '$3') (' => ') ($ VSub_Number '$4') ) } { (DQ ('\n') ('\t\tactual=') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("(git submodule--helper resolve-relative-url-test '") ($ VSub_Number '$1') ("' '") ($ VSub_Number '$2') ("' '") ($ VSub_Number '$3') ("') &&\n") ('\t\ttest ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (actual) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (" = '") ($ VSub_Number '$4') ("'\n") ('\t') ) } ) ] ) ) (command.FuncDef name: test_git_path body: (command.BraceGroup children: [ (C {(test_expect_success)} { (DQ ('git-path ') ($ VSub_Number '$1') (' ') ($ VSub_Number '$2') (' => ') ($ VSub_Number '$3') ) } { (DQ ('\n') ('\t\t') ($ VSub_Number '$1') (' git rev-parse --git-path ') ($ VSub_Number '$2') (' >actual &&\n') ('\t\techo ') ($ VSub_Number '$3') (' >expect &&\n') ('\t\ttest_cmp expect actual\n') ('\t') ) } ) ] ) ) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:rootoff) op: Equal rhs: { (word_part.CommandSubPart command_list: (command.CommandList children: [ (command.Pipeline children: [ (C {(test-path-utils)} {(normalize_path_copy)} {(/)}) (C {(wc)} {(-c)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> ) } ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (C {(test)} {($ VSub_DollarName '$rootoff')} {(Lit_Other '=')} {(2)}) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:rootoff) op:Equal rhs:(word.EmptyWord))] ) ] ) ] else_action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:rootoff) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w:{($ VSub_DollarName '$rootoff')}) right: (arith_expr.ArithWord w:{(Lit_Digits 1)}) ) ) } ) ] ) (command.Case to_match: { (DQ (word_part.CommandSubPart command_list: (command.CommandList children: [(C {(test-path-utils)} {(print_path)} {(/)})] ) left_token: <Left_CommandSub '$('> ) ) } arms: [ (case_arm pat_list: [{(Lit_Other '*') (/)}] action: [ (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:rootslash) op:Equal rhs:{(1)})] ) ] ) (case_arm pat_list: [{(Lit_Other '*')}] action: [ (command.Assignment keyword: Assign_None pairs: [(assign_pair lhs:(lhs_expr.LhsName name:rootslash) op:Equal rhs:{(0)})] ) ] ) ] ) ] ) (command.FuncDef name: ancestor body: (command.BraceGroup children: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:expected) op: Equal rhs: {($ VSub_Number '$3')} ) ] ) (command.If arms: [ (if_arm cond: [ (command.Sentence child: (command.AndOr ops: [Op_DAmp] children: [ (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$rootoff'))}) (C {(test)} {(DQ (x) ($ VSub_DollarName '$expected'))} {(KW_Bang '!') (Lit_Other '=')} {(x-1)} ) ] ) terminator: <Op_Semi ';'> ) ] action: [ (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:expected) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Minus left: (arith_expr.ArithWord w:{($ VSub_DollarName '$expected')}) right: (arith_expr.ArithWord w:{($ VSub_DollarName '$rootslash')}) ) ) } ) ] ) (command.AndOr ops: [Op_DPipe] children: [ (C {(test)} {($ VSub_DollarName '$expected')} {(-lt)} {(0)}) (command.Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (lhs_expr.LhsName name:expected) op: Equal rhs: { (word_part.ArithSubPart anode: (arith_expr.ArithBinary op_id: Arith_Plus left: (arith_expr.ArithWord w: {($ VSub_DollarName '$expected')} ) right: (arith_expr.ArithWord w: {($ VSub_DollarName '$rootoff')} ) ) ) } ) ] ) ] ) ] ) ] ) (C {(test_expect_success)} { (DQ ('longest ancestor: ') ($ VSub_Number '$1') (' ') ($ VSub_Number '$2') (' => ') ($ VSub_DollarName '$expected') ) } { (DQ ('actual=') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("(test-path-utils longest_ancestor_length '") ($ VSub_Number '$1') ("' '") ($ VSub_Number '$2') ("') &&\n") ('\t test ') (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (actual) (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (" = '") ($ VSub_DollarName '$expected') ("'") ) } ) ] ) ) (command.Case to_match: { (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(uname)} {(-s)})]) left_token: <Left_CommandSub '$('> ) } arms: [ (case_arm pat_list:[{(Lit_Other '*') (MINGW) (Lit_Other '*')}]) (case_arm pat_list:[{(Lit_Other '*')}] action:[(C {(test_set_prereq)} {(POSIX)})]) ] ) (C {(test_expect_success)} {(basename)} {(SQ <'test-path-utils basename'>)}) (C {(test_expect_success)} {(dirname)} {(SQ <'test-path-utils dirname'>)}) (C {(norm_path)} {(DQ )} {(DQ )}) (C {(norm_path)} {(.)} {(DQ )}) (C {(norm_path)} {(./)} {(DQ )}) (C {(norm_path)} {(./.)} {(DQ )}) (C {(norm_path)} {(./..)} {(Lit_Other '+') (Lit_Other '+') (failed) (Lit_Other '+') (Lit_Other '+')}) (C {(norm_path)} {(../.)} {(Lit_Other '+') (Lit_Other '+') (failed) (Lit_Other '+') (Lit_Other '+')}) (C {(norm_path)} {(./.././/)} {(Lit_Other '+') (Lit_Other '+') (failed) (Lit_Other '+') (Lit_Other '+')} ) (C {(norm_path)} {(dir/..)} {(DQ )}) (C {(norm_path)} {(dir/sub/../..)} {(DQ )}) (C {(norm_path)} {(dir/sub/../../..)} {(Lit_Other '+') (Lit_Other '+') (failed) (Lit_Other '+') (Lit_Other '+')} ) (C {(norm_path)} {(dir)} {(dir)}) (C {(norm_path)} {(dir//)} {(dir/)}) (C {(norm_path)} {(./dir)} {(dir)}) (C {(norm_path)} {(dir/.)} {(dir/)}) (C {(norm_path)} {(dir///./)} {(dir/)}) (C {(norm_path)} {(dir//sub/..)} {(dir/)}) (C {(norm_path)} {(dir/sub/../)} {(dir/)}) (C {(norm_path)} {(dir/sub/../.)} {(dir/)}) (C {(norm_path)} {(dir/s1/../s2/)} {(dir/s2/)}) (C {(norm_path)} {(d1/s1///s2/..//../s3/)} {(d1/s3/)}) (C {(norm_path)} {(d1/s1//../s2/../../d2)} {(d2)}) (C {(norm_path)} {(d1/.../d2)} {(d1/.../d2)}) (C {(norm_path)} {(d1/..././../d2)} {(d1/d2)}) (C {(norm_path)} {(/)} {(/)}) (C {(norm_path)} {(//)} {(/)} {(POSIX)}) (C {(norm_path)} {(///)} {(/)} {(POSIX)}) (C {(norm_path)} {(/.)} {(/)}) (C {(norm_path)} {(/./)} {(/)} {(POSIX)}) (C {(norm_path)} {(/./..)} {(Lit_Other '+') (Lit_Other '+') (failed) (Lit_Other '+') (Lit_Other '+')} {(POSIX)} ) (C {(norm_path)} {(/../.)} {(Lit_Other '+') (Lit_Other '+') (failed) (Lit_Other '+') (Lit_Other '+')} ) (C {(norm_path)} {(/./.././/)} {(Lit_Other '+') (Lit_Other '+') (failed) (Lit_Other '+') (Lit_Other '+')} {(POSIX)} ) (C {(norm_path)} {(/dir/..)} {(/)} {(POSIX)}) (C {(norm_path)} {(/dir/sub/../..)} {(/)} {(POSIX)}) (C {(norm_path)} {(/dir/sub/../../..)} {(Lit_Other '+') (Lit_Other '+') (failed) (Lit_Other '+') (Lit_Other '+')} {(POSIX)} ) (C {(norm_path)} {(/dir)} {(/dir)}) (C {(norm_path)} {(/dir//)} {(/dir/)}) (C {(norm_path)} {(/./dir)} {(/dir)}) (C {(norm_path)} {(/dir/.)} {(/dir/)}) (C {(norm_path)} {(/dir///./)} {(/dir/)}) (C {(norm_path)} {(/dir//sub/..)} {(/dir/)}) (C {(norm_path)} {(/dir/sub/../)} {(/dir/)}) (C {(norm_path)} {(//dir/sub/../.)} {(/dir/)} {(POSIX)}) (C {(norm_path)} {(/dir/s1/../s2/)} {(/dir/s2/)}) (C {(norm_path)} {(/d1/s1///s2/..//../s3/)} {(/d1/s3/)}) (C {(norm_path)} {(/d1/s1//../s2/../../d2)} {(/d2)}) (C {(norm_path)} {(/d1/.../d2)} {(/d1/.../d2)}) (C {(norm_path)} {(/d1/..././../d2)} {(/d1/d2)}) (C {(ancestor)} {(/)} {(/)} {(-1)}) (C {(ancestor)} {(/foo)} {(/)} {(0)}) (C {(ancestor)} {(/foo)} {(/fo)} {(-1)}) (C {(ancestor)} {(/foo)} {(/foo)} {(-1)}) (C {(ancestor)} {(/foo)} {(/bar)} {(-1)}) (C {(ancestor)} {(/foo)} {(/foo/bar)} {(-1)}) (C {(ancestor)} {(/foo)} {(/foo) (Lit_Other ':') (/bar)} {(-1)}) (C {(ancestor)} {(/foo)} {(/) (Lit_Other ':') (/foo) (Lit_Other ':') (/bar)} {(0)}) (C {(ancestor)} {(/foo)} {(/foo) (Lit_Other ':') (/) (Lit_Other ':') (/bar)} {(0)}) (C {(ancestor)} {(/foo)} {(/) (Lit_Other ':') (/bar) (Lit_Other ':') (/foo)} {(0)}) (C {(ancestor)} {(/foo/bar)} {(/)} {(0)}) (C {(ancestor)} {(/foo/bar)} {(/fo)} {(-1)}) (C {(ancestor)} {(/foo/bar)} {(/foo)} {(4)}) (C {(ancestor)} {(/foo/bar)} {(/foo/ba)} {(-1)}) (C {(ancestor)} {(/foo/bar)} {(/) (Lit_Other ':') (/fo)} {(0)}) (C {(ancestor)} {(/foo/bar)} {(/foo) (Lit_Other ':') (/foo/ba)} {(4)}) (C {(ancestor)} {(/foo/bar)} {(/bar)} {(-1)}) (C {(ancestor)} {(/foo/bar)} {(/fo)} {(-1)}) (C {(ancestor)} {(/foo/bar)} {(/foo) (Lit_Other ':') (/bar)} {(4)}) (C {(ancestor)} {(/foo/bar)} {(/) (Lit_Other ':') (/foo) (Lit_Other ':') (/bar)} {(4)}) (C {(ancestor)} {(/foo/bar)} {(/foo) (Lit_Other ':') (/) (Lit_Other ':') (/bar)} {(4)}) (C {(ancestor)} {(/foo/bar)} {(/) (Lit_Other ':') (/bar) (Lit_Other ':') (/fo)} {(0)}) (C {(ancestor)} {(/foo/bar)} {(/) (Lit_Other ':') (/bar)} {(0)}) (C {(ancestor)} {(/foo/bar)} {(/foo)} {(4)}) (C {(ancestor)} {(/foo/bar)} {(/foo) (Lit_Other ':') (/bar)} {(4)}) (C {(ancestor)} {(/foo/bar)} {(/bar)} {(-1)}) (C {(test_expect_success)} {(SQ <strip_path_suffix>)} { (SQ <'\n'> <'\ttest c:/msysgit = $(test-path-utils strip_path_suffix \\\n'> <'\t\tc:/msysgit/libexec//git-core libexec/git-core)\n'> ) } ) (C {(test_expect_success)} {(SQ <'absolute path rejects the empty string'>)} {(SQ <'\n'> <'\ttest_must_fail test-path-utils absolute_path ""\n'>)} ) (C {(test_expect_success)} {(SQ <'real path rejects the empty string'>)} {(SQ <'\n'> <'\ttest_must_fail test-path-utils real_path ""\n'>)} ) (C {(test_expect_success)} {(POSIX)} {(SQ <'real path works on absolute paths 1'>)} { (SQ <'\n'> <'\tnopath="hopefully-absent-path" &&\n'> <'\ttest "/" = "$(test-path-utils real_path "/")" &&\n'> <'\ttest "/$nopath" = "$(test-path-utils real_path "/$nopath")"\n'> ) } ) (C {(test_expect_success)} {(SQ <'real path works on absolute paths 2'>)} { (SQ <'\n'> <'\tnopath="hopefully-absent-path" &&\n'> <'\t# Find an existing top-level directory for the remaining tests:\n'> <'\td=$(pwd -P | sed -e "s|^\\([^/]*/[^/]*\\)/.*|\\1|") &&\n'> <'\ttest "$d" = "$(test-path-utils real_path "$d")" &&\n'> <'\ttest "$d/$nopath" = "$(test-path-utils real_path "$d/$nopath")"\n'> ) } ) (C {(test_expect_success)} {(POSIX)} {(SQ <'real path removes extra leading slashes'>)} { (SQ <'\n'> <'\tnopath="hopefully-absent-path" &&\n'> <'\ttest "/" = "$(test-path-utils real_path "///")" &&\n'> <'\ttest "/$nopath" = "$(test-path-utils real_path "///$nopath")" &&\n'> <'\t# Find an existing top-level directory for the remaining tests:\n'> <'\td=$(pwd -P | sed -e "s|^\\([^/]*/[^/]*\\)/.*|\\1|") &&\n'> <'\ttest "$d" = "$(test-path-utils real_path "//$d")" &&\n'> <'\ttest "$d/$nopath" = "$(test-path-utils real_path "//$d/$nopath")"\n'> ) } ) (C {(test_expect_success)} {(SQ <'real path removes other extra slashes'>)} { (SQ <'\n'> <'\tnopath="hopefully-absent-path" &&\n'> <'\t# Find an existing top-level directory for the remaining tests:\n'> <'\td=$(pwd -P | sed -e "s|^\\([^/]*/[^/]*\\)/.*|\\1|") &&\n'> <'\ttest "$d" = "$(test-path-utils real_path "$d///")" &&\n'> <'\ttest "$d/$nopath" = "$(test-path-utils real_path "$d///$nopath")"\n'> ) } ) (C {(test_expect_success)} {(SYMLINKS)} {(SQ <'real path works on symlinks'>)} { (SQ <'\n'> <'\tmkdir first &&\n'> <'\tln -s ../.git first/.git &&\n'> <'\tmkdir second &&\n'> <'\tln -s ../first second/other &&\n'> <'\tmkdir third &&\n'> <'\tdir="$(cd .git; pwd -P)" &&\n'> <'\tdir2=third/../second/other/.git &&\n'> <'\ttest "$dir" = "$(test-path-utils real_path $dir2)" &&\n'> <'\tfile="$dir"/index &&\n'> <'\ttest "$file" = "$(test-path-utils real_path $dir2/index)" &&\n'> <'\tbasename=blub &&\n'> <'\ttest "$dir/$basename" = "$(cd .git && test-path-utils real_path "$basename")" &&\n'> <'\tln -s ../first/file .git/syml &&\n'> <'\tsym="$(cd first; pwd -P)"/file &&\n'> <'\ttest "$sym" = "$(test-path-utils real_path "$dir2/syml")"\n'> ) } ) (C {(test_expect_success)} {(SYMLINKS)} {(SQ <'prefix_path works with absolute paths to work tree symlinks'>)} { (SQ <'\n'> <'\tln -s target symlink &&\n'> <'\ttest "$(test-path-utils prefix_path prefix "$(pwd)/symlink")" = "symlink"\n'> ) } ) (C {(test_expect_success)} {(SQ <'prefix_path works with only absolute path to work tree'>)} { (SQ <'\n'> <'\techo "" >expected &&\n'> <'\ttest-path-utils prefix_path prefix "$(pwd)" >actual &&\n'> <'\ttest_cmp expected actual\n'> ) } ) (C {(test_expect_success)} {(SQ <'prefix_path rejects absolute path to dir with same beginning as work tree'>)} {(SQ <'\n'> <'\ttest_must_fail test-path-utils prefix_path prefix "$(pwd)a"\n'>)} ) (C {(test_expect_success)} {(SYMLINKS)} { (SQ < 'prefix_path works with absolute path to a symlink to work tree having same beginning as work tree' > ) } { (SQ <'\n'> <'\tgit init repo &&\n'> <'\tln -s repo repolink &&\n'> < '\ttest "a" = "$(cd repo && test-path-utils prefix_path prefix "$(pwd)/../repolink/a")"\n' > ) } ) (C {(relative_path)} {(/foo/a/b/c/)} {(/foo/a/b/)} {(c/)}) (C {(relative_path)} {(/foo/a/b/c/)} {(/foo/a/b)} {(c/)}) (C {(relative_path)} {(/foo/a//b//c/)} {(///foo/a/b//)} {(c/)} {(POSIX)}) (C {(relative_path)} {(/foo/a/b)} {(/foo/a/b)} {(./)}) (C {(relative_path)} {(/foo/a/b/)} {(/foo/a/b)} {(./)}) (C {(relative_path)} {(/foo/a)} {(/foo/a/b)} {(../)}) (C {(relative_path)} {(/)} {(/foo/a/b/)} {(../../../)}) (C {(relative_path)} {(/foo/a/c)} {(/foo/a/b/)} {(../c)}) (C {(relative_path)} {(/foo/a/c)} {(/foo/a/b)} {(../c)}) (C {(relative_path)} {(/foo/x/y)} {(/foo/a/b/)} {(../../x/y)}) (C {(relative_path)} {(/foo/a/b)} {(DQ ('<empty>'))} {(/foo/a/b)}) (C {(relative_path)} {(/foo/a/b)} {(DQ ('<null>'))} {(/foo/a/b)}) (C {(relative_path)} {(foo/a/b/c/)} {(foo/a/b/)} {(c/)}) (C {(relative_path)} {(foo/a/b/c/)} {(foo/a/b)} {(c/)}) (C {(relative_path)} {(foo/a/b//c)} {(foo/a//b)} {(c)}) (C {(relative_path)} {(foo/a/b/)} {(foo/a/b/)} {(./)}) (C {(relative_path)} {(foo/a/b/)} {(foo/a/b)} {(./)}) (C {(relative_path)} {(foo/a)} {(foo/a/b)} {(../)}) (C {(relative_path)} {(foo/x/y)} {(foo/a/b)} {(../../x/y)}) (C {(relative_path)} {(foo/a/c)} {(foo/a/b)} {(../c)}) (C {(relative_path)} {(foo/a/b)} {(/foo/x/y)} {(foo/a/b)}) (C {(relative_path)} {(/foo/a/b)} {(foo/x/y)} {(/foo/a/b)}) (C {(relative_path)} {(d) (Lit_Other ':') (/a/b)} {(D) (Lit_Other ':') (/a/c)} {(../b)} {(MINGW)}) (C {(relative_path)} {(C) (Lit_Other ':') (/a/b)} {(D) (Lit_Other ':') (/a/c)} {(C) (Lit_Other ':') (/a/b)} {(MINGW)} ) (C {(relative_path)} {(foo/a/b)} {(DQ ('<empty>'))} {(foo/a/b)}) (C {(relative_path)} {(foo/a/b)} {(DQ ('<null>'))} {(foo/a/b)}) (C {(relative_path)} {(DQ ('<empty>'))} {(/foo/a/b)} {(./)}) (C {(relative_path)} {(DQ ('<empty>'))} {(DQ ('<empty>'))} {(./)}) (C {(relative_path)} {(DQ ('<empty>'))} {(DQ ('<null>'))} {(./)}) (C {(relative_path)} {(DQ ('<null>'))} {(DQ ('<empty>'))} {(./)}) (C {(relative_path)} {(DQ ('<null>'))} {(DQ ('<null>'))} {(./)}) (C {(relative_path)} {(DQ ('<null>'))} {(/foo/a/b)} {(./)}) (C {(test_git_path)} {(Lit_VarLike 'A=') (B)} {(info/grafts)} {(.git/info/grafts)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_GRAFT_FILE=') (foo)} {(info/grafts)} {(foo)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_GRAFT_FILE=') (foo)} {(info/////grafts)} {(foo)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_INDEX_FILE=') (foo)} {(index)} {(foo)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_INDEX_FILE=') (foo)} {(index/foo)} {(.git/index/foo)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_INDEX_FILE=') (foo)} {(index2)} {(.git/index2)}) (C {(test_expect_success)} {(SQ <'setup fake objects directory foo'>)} {(SQ <'mkdir foo'>)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_OBJECT_DIRECTORY=') (foo)} {(objects)} {(foo)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_OBJECT_DIRECTORY=') (foo)} {(objects/foo)} {(foo/foo)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_OBJECT_DIRECTORY=') (foo)} {(objects2)} {(.git/objects2)}) (C {(test_expect_success)} {(SQ <'setup common repository'>)} {(SQ <'git --git-dir=bar init'>)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(index)} {(.git/index)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(HEAD)} {(.git/HEAD)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(logs/HEAD)} {(.git/logs/HEAD)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(logs/refs/bisect/foo)} {(.git/logs/refs/bisect/foo)} ) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(logs/refs/bisec/foo)} {(bar/logs/refs/bisec/foo)} ) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(logs/refs/bisec)} {(bar/logs/refs/bisec)} ) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(logs/refs/bisectfoo)} {(bar/logs/refs/bisectfoo)} ) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(objects)} {(bar/objects)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(objects/bar)} {(bar/objects/bar)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(info/exclude)} {(bar/info/exclude)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(info/grafts)} {(bar/info/grafts)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(info/sparse-checkout)} {(.git/info/sparse-checkout)} ) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(info//sparse-checkout)} {(.git/info//sparse-checkout)} ) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(remotes/bar)} {(bar/remotes/bar)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(branches/bar)} {(bar/branches/bar)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(logs/refs/heads/master)} {(bar/logs/refs/heads/master)} ) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(refs/heads/master)} {(bar/refs/heads/master)} ) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(refs/bisect/foo)} {(.git/refs/bisect/foo)} ) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(hooks/me)} {(bar/hooks/me)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(config)} {(bar/config)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(packed-refs)} {(bar/packed-refs)}) (C {(test_git_path)} {(Lit_VarLike 'GIT_COMMON_DIR=') (bar)} {(shallow)} {(bar/shallow)}) (C {(test_submodule_relative_url)} {(DQ (../))} {(DQ (../foo))} {(DQ (../submodule))} {(DQ (../../submodule))} ) (C {(test_submodule_relative_url)} {(DQ (../))} {(DQ (../foo/bar))} {(DQ (../submodule))} {(DQ (../../foo/submodule))} ) (C {(test_submodule_relative_url)} {(DQ (../))} {(DQ (../foo/submodule))} {(DQ (../submodule))} {(DQ (../../foo/submodule))} ) (C {(test_submodule_relative_url)} {(DQ (../))} {(DQ (./foo))} {(DQ (../submodule))} {(DQ (../submodule))} ) (C {(test_submodule_relative_url)} {(DQ (../))} {(DQ (./foo/bar))} {(DQ (../submodule))} {(DQ (../foo/submodule))} ) (C {(test_submodule_relative_url)} {(DQ (../../../))} {(DQ (../foo/bar))} {(DQ (../sub/a/b/c))} {(DQ (../../../../foo/sub/a/b/c))} ) (C {(test_submodule_relative_url)} {(DQ (../))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/addtest) ) } {(DQ (../repo))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/repo) ) } ) (C {(test_submodule_relative_url)} {(DQ (../))} {(DQ (foo/bar))} {(DQ (../submodule))} {(DQ (../foo/submodule))} ) (C {(test_submodule_relative_url)} {(DQ (../))} {(DQ (foo))} {(DQ (../submodule))} {(DQ (../submodule))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ (../foo/bar))} {(DQ (../sub/a/b/c))} {(DQ (../foo/sub/a/b/c))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ (../foo/bar))} {(DQ (../sub/a/b/c/))} {(DQ (../foo/sub/a/b/c))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ (../foo/bar/))} {(DQ (../sub/a/b/c))} {(DQ (../foo/sub/a/b/c))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ (../foo/bar))} {(DQ (../submodule))} {(DQ (../foo/submodule))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ (../foo/submodule))} {(DQ (../submodule))} {(DQ (../foo/submodule))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ (../foo))} {(DQ (../submodule))} {(DQ (../submodule))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ (./foo/bar))} {(DQ (../submodule))} {(DQ (foo/submodule))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ (./foo))} {(DQ (../submodule))} {(DQ (submodule))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ ('//somewhere else/repo'))} {(DQ (../subrepo))} {(DQ ('//somewhere else/subrepo'))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/subsuper_update_r) ) } {(DQ (../subsubsuper_update_r))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/subsubsuper_update_r) ) } ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/super_update_r2) ) } {(DQ (../subsuper_update_r))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/subsuper_update_r) ) } ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/.) ) } {(DQ (../.))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/.) ) } ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) ) } {(DQ (./.))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/.) ) } ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/addtest) ) } {(DQ (../repo))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/repo) ) } ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) ) } {(DQ ('./\xc3\xa5 \xc3\xa4\xc3\xb6'))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) ('/\xc3\xa5 \xc3\xa4\xc3\xb6') ) } ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/.) ) } {(DQ (../submodule))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/submodule) ) } ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/submodule) ) } {(DQ (../submodule))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/submodule) ) } ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/home2/../remote) ) } {(DQ (../bundle1))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/home2/../bundle1) ) } ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/submodule_update_repo) ) } {(DQ (./.))} { (DQ (word_part.CommandSubPart command_list: (command.CommandList children:[(C {(pwd)})]) left_token: <Left_CommandSub '$('> ) (/submodule_update_repo/.) ) } ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ ('file:///tmp/repo'))} {(DQ (../subrepo))} {(DQ ('file:///tmp/subrepo'))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ (foo/bar))} {(DQ (../submodule))} {(DQ (foo/submodule))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ (foo))} {(DQ (../submodule))} {(DQ (submodule))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ ('helper:://hostname/repo'))} {(DQ (../subrepo))} {(DQ ('helper:://hostname/subrepo'))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ ('ssh://hostname/repo'))} {(DQ (../subrepo))} {(DQ ('ssh://hostname/subrepo'))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ ('ssh://hostname:22/repo'))} {(DQ (../subrepo))} {(DQ ('ssh://hostname:22/subrepo'))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ ('user@host:path/to/repo'))} {(DQ (../subrepo))} {(DQ ('user@host:path/to/subrepo'))} ) (C {(test_submodule_relative_url)} {(DQ ('(null)'))} {(DQ ('user@host:repo'))} {(DQ (../subrepo))} {(DQ ('user@host:subrepo'))} ) (C {(test_done)}) ] )