(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:test_description)
          op: Equal
          rhs: {(SQ <'Test various path utilities'>)}
          spids: [13]
        )
      ]
      spids: [13]
    )
    (C {(.)} {(./test-lib.sh)})
    (FuncDef
      name: norm_path
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:expected)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(test-path-utils)} {(print_path)} {(DQ ($ VSub_Number '$2'))})
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [32 40]
                      )
                    }
                  spids: [31]
                )
              ]
              spids: [31]
            )
            (C {(test_expect_success)} {($ VSub_Number '$3')} 
              {(DQ ('normalize path: ') ($ VSub_Number '$1') (' => ') ($ VSub_Number '$2'))} 
              {
                (DQ ('test ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                  (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("(test-path-utils normalize_path_copy '") ($ VSub_Number '$1') ("')") 
                  (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (" = '") ($ VSub_Name '$expected') ("'")
                )
              }
            )
          ]
          spids: [28]
        )
      spids: [24 27]
    )
    (FuncDef
      name: relative_path
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:expected)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (C {(test-path-utils)} {(print_path)} {(DQ ($ VSub_Number '$3'))})
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                        spids: [80 88]
                      )
                    }
                  spids: [79]
                )
              ]
              spids: [79]
            )
            (C {(test_expect_success)} {($ VSub_Number '$4')} 
              {
                (DQ ('relative path: ') ($ VSub_Number '$1') (' ') ($ VSub_Number '$2') (' => ') 
                  ($ VSub_Number '$3')
                )
              } 
              {
                (DQ ('test ') (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) 
                  (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) ("(test-path-utils relative_path '") ($ VSub_Number '$1') ("' '") ($ VSub_Number '$2') ("')") 
                  (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (" = '") ($ VSub_Name '$expected') ("'")
                )
              }
            )
          ]
          spids: [76]
        )
      spids: [72 75]
    )
    (FuncDef
      name: test_submodule_relative_url
      body: 
        (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=') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) 
                  ("(git submodule--helper resolve-relative-url-test '") ($ VSub_Number '$1') ("' '") ($ VSub_Number '$2') ("' '") ($ VSub_Number '$3') ("') &&\n") ('\t\ttest ') 
                  (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (actual) 
                  (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (" = '") ($ VSub_Number '$4') ("'\n") ('\t')
                )
              }
            )
          ]
          spids: [128]
        )
      spids: [124 127]
    )
    (FuncDef
      name: test_git_path
      body: 
        (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')
                )
              }
            )
          ]
          spids: [173]
        )
      spids: [169 172]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:rootoff)
          op: Equal
          rhs: 
            {
              (CommandSubPart
                command_list: 
                  (CommandList
                    children: [
                      (Pipeline
                        children: [
                          (C {(test-path-utils)} {(normalize_path_copy)} {(/)})
                          (C {(wc)} {(-c)})
                        ]
                        negated: F
                      )
                    ]
                  )
                left_token: <Left_CommandSub '$('>
                spids: [214 226]
              )
            }
          spids: [213]
        )
      ]
      spids: [213]
    )
    (If
      arms: [
        (if_arm
          cond: [
            (Sentence
              child: (C {(test)} {($ VSub_Name '$rootoff')} {(Lit_Other '=')} {(2)})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(LhsName name:rootoff) op:Equal rhs:{(EmptyPart)} spids:[245])]
              spids: [245]
            )
          ]
          spids: [16777215 242]
        )
      ]
      else_action: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:rootoff)
              op: Equal
              rhs: 
                {
                  (ArithSubPart
                    anode: 
                      (ArithBinary
                        op_id: Arith_Minus
                        left: (ArithWord w:{($ VSub_Name '$rootoff')})
                        right: (ArithWord w:{(Lit_Digits 1)})
                      )
                    spids: [254 259]
                  )
                }
              spids: [253]
            )
          ]
          spids: [253]
        )
        (Case
          to_match: 
            {
              (DQ 
                (CommandSubPart
                  command_list: (CommandList children:[(C {(test-path-utils)} {(print_path)} {(/)})])
                  left_token: <Left_CommandSub '$('>
                  spids: [277 283]
                )
              )
            }
          arms: [
            (case_arm
              pat_list: [{(Lit_Other '*') (/)}]
              action: [
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LhsName name:rootslash) op:Equal rhs:{(1)} spids:[293])]
                  spids: [293]
                )
              ]
              spids: [289 291 295 16777215]
            )
            (case_arm
              pat_list: [{(Lit_Other '*')}]
              action: [
                (Assignment
                  keyword: Assign_None
                  pairs: [(assign_pair lhs:(LhsName name:rootslash) op:Equal rhs:{(0)} spids:[301])]
                  spids: [301]
                )
              ]
              spids: [298 299 303 16777215]
            )
          ]
          spids: [274 286 306]
        )
      ]
      spids: [250 308]
    )
    (FuncDef
      name: ancestor
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:expected)
                  op: Equal
                  rhs: {($ VSub_Number '$3')}
                  spids: [322]
                )
              ]
              spids: [322]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (AndOr
                          ops: [Op_DAmp]
                          children: [
                            (C {(test)} {(-n)} {(DQ ($ VSub_Name '$rootoff'))})
                            (C {(test)} {(DQ (x) ($ VSub_Name '$expected'))} 
                              {(KW_Bang '!') (Lit_Other '=')} {(x-1)}
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:expected)
                          op: Equal
                          rhs: 
                            {
                              (ArithSubPart
                                anode: 
                                  (ArithBinary
                                    op_id: Arith_Minus
                                    left: (ArithWord w:{($ VSub_Name '$expected')})
                                    right: (ArithWord w:{($ VSub_Name '$rootslash')})
                                  )
                                spids: [355 360]
                              )
                            }
                          spids: [354]
                        )
                      ]
                      spids: [354]
                    )
                    (AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(test)} {($ VSub_Name '$expected')} {(-lt)} {(0)})
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:expected)
                              op: Equal
                              rhs: 
                                {
                                  (ArithSubPart
                                    anode: 
                                      (ArithBinary
                                        op_id: Arith_Plus
                                        left: (ArithWord w:{($ VSub_Name '$expected')})
                                        right: (ArithWord w:{($ VSub_Name '$rootoff')})
                                      )
                                    spids: [375 380]
                                  )
                                }
                              spids: [374]
                            )
                          ]
                          spids: [374]
                        )
                      ]
                    )
                  ]
                  spids: [16777215 351]
                )
              ]
              spids: [16777215 383]
            )
            (C {(test_expect_success)} 
              {
                (DQ ('longest ancestor: ') ($ VSub_Number '$1') (' ') ($ VSub_Number '$2') (' => ') 
                  ($ VSub_Name '$expected')
                )
              } 
              {
                (DQ ('actual=') (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) 
                  ("(test-path-utils longest_ancestor_length '") ($ VSub_Number '$1') ("' '") ($ VSub_Number '$2') ("') &&\n") ('\t test ') 
                  (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (actual) 
                  (EscapedLiteralPart token:<Lit_EscapedChar '\\"'>) (" = '") ($ VSub_Name '$expected') ("'")
                )
              }
            )
          ]
          spids: [315]
        )
      spids: [311 314]
    )
    (Case
      to_match: 
        {
          (CommandSubPart
            command_list: (CommandList children:[(C {(uname)} {(-s)})])
            left_token: <Left_CommandSub '$('>
            spids: [428 432]
          )
        }
      arms: [
        (case_arm
          pat_list: [{(Lit_Other '*') (MINGW) (Lit_Other '*')}]
          spids: [436 439 442 16777215]
        )
        (case_arm
          pat_list: [{(Lit_Other '*')}]
          action: [(C {(test_set_prereq)} {(POSIX)})]
          spids: [444 445 453 16777215]
        )
      ]
      spids: [426 434 455]
    )
    (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 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [1977 1979]
          ) (/addtest)
        )
      } {(DQ (../repo))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [1988 1990]
          ) (/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 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2200 2202]
          ) (/subsuper_update_r)
        )
      } {(DQ (../subsubsuper_update_r))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2211 2213]
          ) (/subsubsuper_update_r)
        )
      }
    )
    (C {(test_submodule_relative_url)} {(DQ ('(null)'))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2224 2226]
          ) (/super_update_r2)
        )
      } {(DQ (../subsuper_update_r))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2235 2237]
          ) (/subsuper_update_r)
        )
      }
    )
    (C {(test_submodule_relative_url)} {(DQ ('(null)'))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2248 2250]
          ) (/.)
        )
      } {(DQ (../.))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2259 2261]
          ) (/.)
        )
      }
    )
    (C {(test_submodule_relative_url)} {(DQ ('(null)'))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2272 2274]
          )
        )
      } {(DQ (./.))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2282 2284]
          ) (/.)
        )
      }
    )
    (C {(test_submodule_relative_url)} {(DQ ('(null)'))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2295 2297]
          ) (/addtest)
        )
      } {(DQ (../repo))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2306 2308]
          ) (/repo)
        )
      }
    )
    (C {(test_submodule_relative_url)} {(DQ ('(null)'))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2319 2321]
          )
        )
      } {(DQ ('./\xc3\xa5 \xc3\xa4\xc3\xb6'))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2329 2331]
          ) ('/\xc3\xa5 \xc3\xa4\xc3\xb6')
        )
      }
    )
    (C {(test_submodule_relative_url)} {(DQ ('(null)'))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2342 2344]
          ) (/.)
        )
      } {(DQ (../submodule))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2353 2355]
          ) (/submodule)
        )
      }
    )
    (C {(test_submodule_relative_url)} {(DQ ('(null)'))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2366 2368]
          ) (/submodule)
        )
      } {(DQ (../submodule))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2377 2379]
          ) (/submodule)
        )
      }
    )
    (C {(test_submodule_relative_url)} {(DQ ('(null)'))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2390 2392]
          ) (/home2/../remote)
        )
      } {(DQ (../bundle1))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2401 2403]
          ) (/home2/../bundle1)
        )
      }
    )
    (C {(test_submodule_relative_url)} {(DQ ('(null)'))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2414 2416]
          ) (/submodule_update_repo)
        )
      } {(DQ (./.))} 
      {
        (DQ 
          (CommandSubPart
            command_list: (CommandList children:[(C {(pwd)})])
            left_token: <Left_CommandSub '$('>
            spids: [2425 2427]
          ) (/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)})
  ]
)