(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(clone)}
          spids: [4]
        )
      ]
    )
    (C {(.)} {(./test-lib.sh)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:X)
          op: assign_op.Equal
          rhs: (word.Empty)
          spids: [13]
        )
      ]
    )
    (command.AndOr
      ops: [Id.Op_DPipe]
      children: [
        (C {(test_have_prereq)} {(Id.KW_Bang '!') (MINGW)})
        (command.ShAssignment
          pairs: [
            (assign_pair
              lhs: (sh_lhs_expr.Name name:X)
              op: assign_op.Equal
              rhs: {(.exe)}
              spids: [22]
            )
          ]
        )
      ]
    )
    (C {(test_expect_success)} {(setup)} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:31) (Token id:Id.Lit_Chars val:'\n' span_id:32) 
          (Token id:Id.Lit_Chars val:'\trm -fr .git &&\n' span_id:33) (Token id:Id.Lit_Chars val:'\ttest_create_repo src &&\n' span_id:34) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:35) (Token id:Id.Lit_Chars val:'\t\tcd src &&\n' span_id:36) 
          (Token id:Id.Lit_Chars val:'\t\t>file &&\n' span_id:37) (Token id:Id.Lit_Chars val:'\t\tgit add file &&\n' span_id:38) 
          (Token id:Id.Lit_Chars val:'\t\tgit commit -m initial &&\n' span_id:39) (Token id:Id.Lit_Chars val:'\t\techo 1 >file &&\n' span_id:40) 
          (Token id:Id.Lit_Chars val:'\t\tgit add file &&\n' span_id:41) (Token id:Id.Lit_Chars val:'\t\tgit commit -m updated\n' span_id:42) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:43) (Token id:Id.Lit_Chars val:'\n' span_id:44)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone with excess parameters (1)' span_id:51))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:55) (Token id:Id.Lit_Chars val:'\n' span_id:56) 
          (Token id:Id.Lit_Chars val:'\trm -fr dst &&\n' span_id:57) (Token id:Id.Lit_Chars val:'\ttest_must_fail git clone -n src dst junk\n' span_id:58) 
          (Token id:Id.Lit_Chars val:'\n' span_id:59)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone with excess parameters (2)' span_id:66))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:70) (Token id:Id.Lit_Chars val:'\n' span_id:71) 
          (Token id:Id.Lit_Chars val:'\trm -fr dst &&\n' span_id:72) (Token id:Id.Lit_Chars val:'\ttest_must_fail git clone -n "file://$(pwd)/src" dst junk\n' span_id:73) 
          (Token id:Id.Lit_Chars val:'\n' span_id:74)
        )
      }
    )
    (C {(test_expect_success)} {(C_LOCALE_OUTPUT)} 
      {(SQ (Token id:Id.Lit_Chars val:'output from clone' span_id:83))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:87) 
          (Token id:Id.Lit_Chars val:'\trm -fr dst &&\n' span_id:88) (Token id:Id.Lit_Chars val:'\tgit clone -n "file://$(pwd)/src" dst >output 2>&1 &&\n' span_id:89) 
          (Token id:Id.Lit_Chars val:'\ttest $(grep Clon output | wc -l) = 1\n' span_id:90)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'clone does not keep pack' span_id:97))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:101) (Token id:Id.Lit_Chars val:'\n' span_id:102) 
          (Token id:Id.Lit_Chars val:'\trm -fr dst &&\n' span_id:103) (Token id:Id.Lit_Chars val:'\tgit clone -n "file://$(pwd)/src" dst &&\n' span_id:104) 
          (Token id:Id.Lit_Chars val:'\t! test -f dst/file &&\n' span_id:105) (Token id:Id.Lit_Chars val:'\t! (echo dst/.git/objects/pack/pack-* | grep "\\.keep")\n' span_id:106) 
          (Token id:Id.Lit_Chars val:'\n' span_id:107)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'clone checks out files' span_id:114))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:118) (Token id:Id.Lit_Chars val:'\n' span_id:119) 
          (Token id:Id.Lit_Chars val:'\trm -fr dst &&\n' span_id:120) (Token id:Id.Lit_Chars val:'\tgit clone src dst &&\n' span_id:121) 
          (Token id:Id.Lit_Chars val:'\ttest -f dst/file\n' span_id:122) (Token id:Id.Lit_Chars val:'\n' span_id:123)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone respects GIT_WORK_TREE' span_id:130))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:134) (Token id:Id.Lit_Chars val:'\n' span_id:135) 
          (Token
            id: Id.Lit_Chars
            val: '\tGIT_WORK_TREE=worktree git clone src bare &&\n'
            span_id: 136
          ) (Token id:Id.Lit_Chars val:'\ttest -f bare/config &&\n' span_id:137) 
          (Token id:Id.Lit_Chars val:'\ttest -f worktree/file\n' span_id:138) (Token id:Id.Lit_Chars val:'\n' span_id:139)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'clone from hooks' span_id:146))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:150) (Token id:Id.Lit_Chars val:'\n' span_id:151) 
          (Token id:Id.Lit_Chars val:'\ttest_create_repo r0 &&\n' span_id:152) (Token id:Id.Lit_Chars val:'\tcd r0 &&\n' span_id:153) 
          (Token id:Id.Lit_Chars val:'\ttest_commit initial &&\n' span_id:154) (Token id:Id.Lit_Chars val:'\tcd .. &&\n' span_id:155) 
          (Token id:Id.Lit_Chars val:'\tgit init r1 &&\n' span_id:156) (Token id:Id.Lit_Chars val:'\tcd r1 &&\n' span_id:157) 
          (Token
            id: Id.Lit_Chars
            val: '\tcat >.git/hooks/pre-commit <<-\\EOF &&\n'
            span_id: 158
          ) (Token id:Id.Lit_Chars val:'\t#!/bin/sh\n' span_id:159) 
          (Token id:Id.Lit_Chars val:'\tgit clone ../r0 ../r2\n' span_id:160) (Token id:Id.Lit_Chars val:'\texit 1\n' span_id:161) (Token id:Id.Lit_Chars val:'\tEOF\n' span_id:162) 
          (Token id:Id.Lit_Chars val:'\tchmod u+x .git/hooks/pre-commit &&\n' span_id:163) (Token id:Id.Lit_Chars val:'\t: >file &&\n' span_id:164) 
          (Token id:Id.Lit_Chars val:'\tgit add file &&\n' span_id:165) (Token id:Id.Lit_Chars val:'\ttest_must_fail git commit -m invoke-hook &&\n' span_id:166) 
          (Token id:Id.Lit_Chars val:'\tcd .. &&\n' span_id:167) (Token id:Id.Lit_Chars val:'\ttest_cmp r0/.git/HEAD r2/.git/HEAD &&\n' span_id:168) 
          (Token id:Id.Lit_Chars val:'\ttest_cmp r0/initial.t r2/initial.t\n' span_id:169) (Token id:Id.Lit_Chars val:'\n' span_id:170)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone creates intermediate directories' span_id:177))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:181) (Token id:Id.Lit_Chars val:'\n' span_id:182) 
          (Token id:Id.Lit_Chars val:'\tgit clone src long/path/to/dst &&\n' span_id:183) (Token id:Id.Lit_Chars val:'\ttest -f long/path/to/dst/file\n' span_id:184) 
          (Token id:Id.Lit_Chars val:'\n' span_id:185)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'clone creates intermediate directories for bare repo'
            span_id: 192
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:196) (Token id:Id.Lit_Chars val:'\n' span_id:197) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone --bare src long/path/to/bare/dst &&\n'
            span_id: 198
          ) (Token id:Id.Lit_Chars val:'\ttest -f long/path/to/bare/dst/config\n' span_id:199) 
          (Token id:Id.Lit_Chars val:'\n' span_id:200)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'clone --mirror' span_id:207))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:211) (Token id:Id.Lit_Chars val:'\n' span_id:212) 
          (Token id:Id.Lit_Chars val:'\tgit clone --mirror src mirror &&\n' span_id:213) (Token id:Id.Lit_Chars val:'\ttest -f mirror/HEAD &&\n' span_id:214) 
          (Token id:Id.Lit_Chars val:'\ttest ! -f mirror/file &&\n' span_id:215) 
          (Token
            id: Id.Lit_Chars
            val: '\tFETCH="$(cd mirror && git config remote.origin.fetch)" &&\n'
            span_id: 216
          ) (Token id:Id.Lit_Chars val:'\ttest "+refs/*:refs/*" = "$FETCH" &&\n' span_id:217) 
          (Token
            id: Id.Lit_Chars
            val: '\tMIRROR="$(cd mirror && git config --bool remote.origin.mirror)" &&\n'
            span_id: 218
          ) (Token id:Id.Lit_Chars val:'\ttest "$MIRROR" = true\n' span_id:219) 
          (Token id:Id.Lit_Chars val:'\n' span_id:220)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone --mirror with detached HEAD' span_id:227))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:231) (Token id:Id.Lit_Chars val:'\n' span_id:232) 
          (Token
            id: Id.Lit_Chars
            val: '\t( cd src && git checkout HEAD^ && git rev-parse HEAD >../expected ) &&\n'
            span_id: 233
          ) (Token id:Id.Lit_Chars val:'\tgit clone --mirror src mirror.detached &&\n' span_id:234) 
          (Token id:Id.Lit_Chars val:'\t( cd src && git checkout - ) &&\n' span_id:235) (Token id:Id.Lit_Chars val:'\tGIT_DIR=mirror.detached git rev-parse HEAD >actual &&\n' span_id:236) 
          (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:237) (Token id:Id.Lit_Chars val:'\n' span_id:238)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone --bare with detached HEAD' span_id:245))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:249) (Token id:Id.Lit_Chars val:'\n' span_id:250) 
          (Token
            id: Id.Lit_Chars
            val: '\t( cd src && git checkout HEAD^ && git rev-parse HEAD >../expected ) &&\n'
            span_id: 251
          ) (Token id:Id.Lit_Chars val:'\tgit clone --bare src bare.detached &&\n' span_id:252) 
          (Token id:Id.Lit_Chars val:'\t( cd src && git checkout - ) &&\n' span_id:253) (Token id:Id.Lit_Chars val:'\tGIT_DIR=bare.detached git rev-parse HEAD >actual &&\n' span_id:254) 
          (Token id:Id.Lit_Chars val:'\ttest_cmp expected actual\n' span_id:255) (Token id:Id.Lit_Chars val:'\n' span_id:256)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'clone --bare names the local repository <name>.git'
            span_id: 263
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:267) (Token id:Id.Lit_Chars val:'\n' span_id:268) 
          (Token id:Id.Lit_Chars val:'\tgit clone --bare src &&\n' span_id:269) (Token id:Id.Lit_Chars val:'\ttest -d src.git\n' span_id:270) 
          (Token id:Id.Lit_Chars val:'\n' span_id:271)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone --mirror does not repeat tags' span_id:278))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:282) (Token id:Id.Lit_Chars val:'\n' span_id:283) 
          (Token id:Id.Lit_Chars val:'\t(cd src &&\n' span_id:284) (Token id:Id.Lit_Chars val:'\t git tag some-tag HEAD) &&\n' span_id:285) 
          (Token id:Id.Lit_Chars val:'\tgit clone --mirror src mirror2 &&\n' span_id:286) (Token id:Id.Lit_Chars val:'\t(cd mirror2 &&\n' span_id:287) 
          (Token
            id: Id.Lit_Chars
            val: '\t git show-ref 2> clone.err > clone.out) &&\n'
            span_id: 288
          ) (Token id:Id.Lit_Chars val:'\ttest_must_fail grep Duplicate mirror2/clone.err &&\n' span_id:289) 
          (Token id:Id.Lit_Chars val:'\tgrep some-tag mirror2/clone.out\n' span_id:290) (Token id:Id.Lit_Chars val:'\n' span_id:291)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone to destination with trailing /' span_id:298))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:302) (Token id:Id.Lit_Chars val:'\n' span_id:303) 
          (Token id:Id.Lit_Chars val:'\tgit clone src target-1/ &&\n' span_id:304) (Token id:Id.Lit_Chars val:'\tT=$( cd target-1 && git rev-parse HEAD ) &&\n' span_id:305) 
          (Token
            id: Id.Lit_Chars
            val: '\tS=$( cd src && git rev-parse HEAD ) &&\n'
            span_id: 306
          ) (Token id:Id.Lit_Chars val:'\ttest "$T" = "$S"\n' span_id:307) 
          (Token id:Id.Lit_Chars val:'\n' span_id:308)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone to destination with extra trailing /' span_id:315))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:319) (Token id:Id.Lit_Chars val:'\n' span_id:320) 
          (Token id:Id.Lit_Chars val:'\tgit clone src target-2/// &&\n' span_id:321) (Token id:Id.Lit_Chars val:'\tT=$( cd target-2 && git rev-parse HEAD ) &&\n' span_id:322) 
          (Token
            id: Id.Lit_Chars
            val: '\tS=$( cd src && git rev-parse HEAD ) &&\n'
            span_id: 323
          ) (Token id:Id.Lit_Chars val:'\ttest "$T" = "$S"\n' span_id:324) 
          (Token id:Id.Lit_Chars val:'\n' span_id:325)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone to an existing empty directory' span_id:332))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:336) 
          (Token id:Id.Lit_Chars val:'\tmkdir target-3 &&\n' span_id:337) (Token id:Id.Lit_Chars val:'\tgit clone src target-3 &&\n' span_id:338) 
          (Token
            id: Id.Lit_Chars
            val: '\tT=$( cd target-3 && git rev-parse HEAD ) &&\n'
            span_id: 339
          ) (Token id:Id.Lit_Chars val:'\tS=$( cd src && git rev-parse HEAD ) &&\n' span_id:340) 
          (Token id:Id.Lit_Chars val:'\ttest "$T" = "$S"\n' span_id:341)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone to an existing non-empty directory' span_id:348))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:352) 
          (Token id:Id.Lit_Chars val:'\tmkdir target-4 &&\n' span_id:353) (Token id:Id.Lit_Chars val:'\t>target-4/Fakefile &&\n' span_id:354) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git clone src target-4\n'
            span_id: 355
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone to an existing path' span_id:362))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:366) 
          (Token id:Id.Lit_Chars val:'\t>target-5 &&\n' span_id:367) (Token id:Id.Lit_Chars val:'\ttest_must_fail git clone src target-5\n' span_id:368)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'clone a void' span_id:375))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:379) 
          (Token id:Id.Lit_Chars val:'\tmkdir src-0 &&\n' span_id:380) (Token id:Id.Lit_Chars val:'\t(\n' span_id:381) 
          (Token id:Id.Lit_Chars val:'\t\tcd src-0 && git init\n' span_id:382) (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:383) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone "file://$(pwd)/src-0" target-6 2>err-6 &&\n'
            span_id: 384
          ) (Token id:Id.Lit_Chars val:'\t! grep "fatal:" err-6 &&\n' span_id:385) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:386) (Token id:Id.Lit_Chars val:'\t\tcd src-0 && test_commit A\n' span_id:387) 
          (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:388) (Token id:Id.Lit_Chars val:'\tgit clone "file://$(pwd)/src-0" target-7 2>err-7 &&\n' span_id:389) 
          (Token id:Id.Lit_Chars val:'\t! grep "fatal:" err-7 &&\n' span_id:390) (Token id:Id.Lit_Chars val:'\t# There is no reason to insist they are bit-for-bit\n' span_id:391) 
          (Token
            id: Id.Lit_Chars
            val: '\t# identical, but this test should suffice for now.\n'
            span_id: 392
          ) (Token id:Id.Lit_Chars val:'\ttest_cmp target-6/.git/config target-7/.git/config\n' span_id:393)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone respects global branch.autosetuprebase' span_id:400))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:404) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:405) (Token id:Id.Lit_Chars val:'\t\ttest_config="$HOME/.gitconfig" &&\n' span_id:406) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tgit config -f "$test_config" branch.autosetuprebase remote &&\n'
            span_id: 407
          ) (Token id:Id.Lit_Chars val:'\t\trm -fr dst &&\n' span_id:408) 
          (Token id:Id.Lit_Chars val:'\t\tgit clone src dst &&\n' span_id:409) (Token id:Id.Lit_Chars val:'\t\tcd dst &&\n' span_id:410) 
          (Token
            id: Id.Lit_Chars
            val: '\t\tactual="z$(git config branch.master.rebase)" &&\n'
            span_id: 411
          ) (Token id:Id.Lit_Chars val:'\t\ttest ztrue = $actual\n' span_id:412) 
          (Token id:Id.Lit_Chars val:'\t)\n' span_id:413)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'respect url-encoding of file://' span_id:420))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:424) 
          (Token id:Id.Lit_Chars val:'\tgit init x+y &&\n' span_id:425) (Token id:Id.Lit_Chars val:'\tgit clone "file://$PWD/x+y" xy-url-1 &&\n' span_id:426) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone "file://$PWD/x%2By" xy-url-2\n'
            span_id: 427
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'do not query-string-decode + in URLs' span_id:434))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:438) 
          (Token id:Id.Lit_Chars val:'\trm -rf x+y &&\n' span_id:439) (Token id:Id.Lit_Chars val:'\tgit init "x y" &&\n' span_id:440) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git clone "file://$PWD/x+y" xy-no-plus\n'
            span_id: 441
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'do not respect url-encoding of non-url path' span_id:448))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:452) 
          (Token id:Id.Lit_Chars val:'\tgit init x+y &&\n' span_id:453) (Token id:Id.Lit_Chars val:'\ttest_must_fail git clone x%2By xy-regular &&\n' span_id:454) 
          (Token id:Id.Lit_Chars val:'\tgit clone x+y xy-regular\n' span_id:455)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'clone separate gitdir' span_id:462))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:466) 
          (Token id:Id.Lit_Chars val:'\trm -rf dst &&\n' span_id:467) (Token id:Id.Lit_Chars val:'\tgit clone --separate-git-dir realgitdir src dst &&\n' span_id:468) 
          (Token id:Id.Lit_Chars val:'\ttest -d realgitdir/refs\n' span_id:469)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone separate gitdir: output' span_id:476))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:480) 
          (Token
            id: Id.Lit_Chars
            val: '\techo "gitdir: $(pwd)/realgitdir" >expected &&\n'
            span_id: 481
          ) (Token id:Id.Lit_Chars val:'\ttest_cmp expected dst/.git\n' span_id:482)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'clone from .git file' span_id:489))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:493) 
          (Token id:Id.Lit_Chars val:'\tgit clone dst/.git dst2\n' span_id:494)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'fetch from .git gitfile' span_id:501))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:505) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:506) (Token id:Id.Lit_Chars val:'\t\tcd dst2 &&\n' span_id:507) 
          (Token id:Id.Lit_Chars val:'\t\tgit fetch ../dst/.git\n' span_id:508) (Token id:Id.Lit_Chars val:'\t)\n' span_id:509)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'fetch from gitfile parent' span_id:516))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:520) 
          (Token id:Id.Lit_Chars val:'\t(\n' span_id:521) (Token id:Id.Lit_Chars val:'\t\tcd dst2 &&\n' span_id:522) 
          (Token id:Id.Lit_Chars val:'\t\tgit fetch ../dst\n' span_id:523) (Token id:Id.Lit_Chars val:'\t)\n' span_id:524)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'clone separate gitdir where target already exists'
            span_id: 531
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:535) 
          (Token id:Id.Lit_Chars val:'\trm -rf dst &&\n' span_id:536) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_must_fail git clone --separate-git-dir realgitdir src dst\n'
            span_id: 537
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone --reference from original' span_id:544))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:548) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone --shared --bare src src-1 &&\n'
            span_id: 549
          ) (Token id:Id.Lit_Chars val:'\tgit clone --bare src src-2 &&\n' span_id:550) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone --reference=src-2 --bare src-1 target-8 &&\n'
            span_id: 551
          ) (Token id:Id.Lit_Chars val:'\tgrep /src-2/ target-8/objects/info/alternates\n' span_id:552)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone with more than one --reference' span_id:559))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:563) 
          (Token id:Id.Lit_Chars val:'\tgit clone --bare src src-3 &&\n' span_id:564) (Token id:Id.Lit_Chars val:'\tgit clone --bare src src-4 &&\n' span_id:565) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone --reference=src-3 --reference=src-4 src target-9 &&\n'
            span_id: 566
          ) (Token id:Id.Lit_Chars val:'\tgrep /src-3/ target-9/.git/objects/info/alternates &&\n' span_id:567) 
          (Token
            id: Id.Lit_Chars
            val: '\tgrep /src-4/ target-9/.git/objects/info/alternates\n'
            span_id: 568
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone from original with relative alternate' span_id:575))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:579) 
          (Token id:Id.Lit_Chars val:'\tmkdir nest &&\n' span_id:580) (Token id:Id.Lit_Chars val:'\tgit clone --bare src nest/src-5 &&\n' span_id:581) 
          (Token
            id: Id.Lit_Chars
            val: '\techo ../../../src/.git/objects >nest/src-5/objects/info/alternates &&\n'
            span_id: 582
          ) (Token id:Id.Lit_Chars val:'\tgit clone --bare nest/src-5 target-10 &&\n' span_id:583) 
          (Token
            id: Id.Lit_Chars
            val: '\tgrep /src/\\\\.git/objects target-10/objects/info/alternates\n'
            span_id: 584
          )
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'clone checking out a tag' span_id:591))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:595) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone --branch=some-tag src dst.tag &&\n'
            span_id: 596
          ) (Token id:Id.Lit_Chars val:'\tGIT_DIR=src/.git git rev-parse some-tag >expected &&\n' span_id:597) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_cmp expected dst.tag/.git/HEAD &&\n'
            span_id: 598
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\tGIT_DIR=dst.tag/.git git config remote.origin.fetch >fetch.actual &&\n'
            span_id: 599
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\techo "+refs/heads/*:refs/remotes/origin/*" >fetch.expected &&\n'
            span_id: 600
          ) (Token id:Id.Lit_Chars val:'\ttest_cmp fetch.expected fetch.actual\n' span_id:601)
        )
      }
    )
    (command.ShFunction
      name: setup_ssh_wrapper
      body: 
        (command.BraceGroup
          children: [
            (C {(test_expect_success)} 
              {(SQ (Token id:Id.Lit_Chars val:'setup ssh wrapper' span_id:616))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:620) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\tcp "$GIT_BUILD_DIR/t/helper/test-fake-ssh$X" \\\n'
                    span_id: 621
                  ) (Token id:Id.Lit_Chars val:'\t\t\t"$TRASH_DIRECTORY/ssh-wrapper$X" &&\n' span_id:622) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\tGIT_SSH="$TRASH_DIRECTORY/ssh-wrapper$X" &&\n'
                    span_id: 623
                  ) (Token id:Id.Lit_Chars val:'\t\texport GIT_SSH &&\n' span_id:624) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\texport TRASH_DIRECTORY &&\n'
                    span_id: 625
                  ) (Token id:Id.Lit_Chars val:'\t\t>"$TRASH_DIRECTORY"/ssh-output\n' span_id:626) 
                  (Token id:Id.Lit_Chars val:'\t' span_id:627)
                )
              }
            )
          ]
        )
    )
    (command.ShFunction
      name: copy_ssh_wrapper_as
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (C {(cp)} 
                  {
                    (DQ ($ Id.VSub_DollarName '$TRASH_DIRECTORY') (/ssh-wrapper) 
                      ($ Id.VSub_DollarName '$X')
                    )
                  } 
                  {
                    (DQ 
                      (braced_var_sub
                        token: (Token id:Id.VSub_Number val:1 span_id:651)
                        suffix_op: 
                          (suffix_op.Unary
                            op_id: Id.VOp1_Percent
                            arg_word: {($ Id.VSub_DollarName '$X')}
                          )
                      ) ($ Id.VSub_DollarName '$X')
                    )
                  }
                )
                (command.ShAssignment
                  pairs: [
                    (assign_pair
                      lhs: (sh_lhs_expr.Name name:GIT_SSH)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (DQ 
                            (braced_var_sub
                              token: (Token id:Id.VSub_Number val:1 span_id:664)
                              suffix_op: 
                                (suffix_op.Unary
                                  op_id: Id.VOp1_Percent
                                  arg_word: {($ Id.VSub_DollarName '$X')}
                                )
                            ) ($ Id.VSub_DollarName '$X')
                          )
                        }
                      spids: [661]
                    )
                  ]
                )
                (C {(export)} {(GIT_SSH)})
              ]
            )
          ]
        )
    )
    (command.ShFunction
      name: expect_ssh
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (C {(test_when_finished)} 
                  {
                    (SQ (Token id:Id.Lit_Chars val:'\n' span_id:692) 
                      (Token
                        id: Id.Lit_Chars
                        val: '\t\t(cd "$TRASH_DIRECTORY" && rm -f ssh-expect && >ssh-output)\n'
                        span_id: 693
                      ) (Token id:Id.Lit_Chars val:'\t' span_id:694)
                    )
                  }
                )
                (command.BraceGroup
                  children: [
                    (command.Case
                      to_match: {(DQ ($ Id.VSub_Pound '$#'))}
                      arms: [
                        (case_arm pat_list:[{(1)}] spids:[712 713 716 -1])
                        (case_arm
                          pat_list: [{(2)}]
                          action: [
                            (C {(echo)} 
                              {
                                (DQ ('ssh: ') ($ Id.VSub_Number '$1') (" git-upload-pack '") 
                                  ($ Id.VSub_Number '$2') ("'")
                                )
                              }
                            )
                          ]
                          spids: [719 720 734 -1]
                        )
                        (case_arm
                          pat_list: [{(3)}]
                          action: [
                            (C {(echo)} 
                              {
                                (DQ ('ssh: ') ($ Id.VSub_Number '$1') (' ') ($ Id.VSub_Number '$2') 
                                  (" git-upload-pack '") ($ Id.VSub_Number '$3') ("'")
                                )
                              }
                            )
                          ]
                          spids: [737 738 754 -1]
                        )
                        (case_arm
                          pat_list: [{(Id.Lit_Star '*')}]
                          action: [
                            (C {(echo)} 
                              {
                                (DQ ('ssh: ') ($ Id.VSub_Number '$1') (' ') ($ Id.VSub_Number '$2') 
                                  (" git-upload-pack '") ($ Id.VSub_Number '$3') ("' ") ($ Id.VSub_Number '$4')
                                )
                              }
                            )
                          ]
                          spids: [757 758 -1 775]
                        )
                      ]
                    )
                  ]
                  redirects: [
                    (redir.Redir
                      op: (Token id:Id.Redir_Great val:'>' span_id:780)
                      fd: -1
                      arg_word: {(DQ ($ Id.VSub_DollarName '$TRASH_DIRECTORY') (/ssh-expect))}
                    )
                  ]
                )
                (command.Subshell
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.AndOr
                          ops: [Id.Op_DAmp]
                          children: [
                            (C {(cd)} {(DQ ($ Id.VSub_DollarName '$TRASH_DIRECTORY'))})
                            (C {(test_cmp)} {(ssh-expect)} {(ssh-output)})
                          ]
                        )
                      ]
                    )
                )
              ]
            )
          ]
        )
    )
    (C {(setup_ssh_wrapper)})
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone myhost:src uses ssh' span_id:814))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:818) 
          (Token id:Id.Lit_Chars val:'\tgit clone myhost:src ssh-clone &&\n' span_id:819) (Token id:Id.Lit_Chars val:'\texpect_ssh myhost src\n' span_id:820)
        )
      }
    )
    (C {(test_expect_success)} {(Id.KW_Bang '!') (MINGW) (Id.Lit_Comma ',') (Id.KW_Bang '!') (CYGWIN)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone local path foo:bar' span_id:833))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:837) 
          (Token id:Id.Lit_Chars val:'\tcp -R src "foo:bar" &&\n' span_id:838) (Token id:Id.Lit_Chars val:'\tgit clone "foo:bar" foobar &&\n' span_id:839) 
          (Token id:Id.Lit_Chars val:'\texpect_ssh none\n' span_id:840)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'bracketed hostnames are still ssh' span_id:847))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:851) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone "[myhost:123]:src" ssh-bracket-clone &&\n'
            span_id: 852
          ) (Token id:Id.Lit_Chars val:'\texpect_ssh "-p 123" myhost src\n' span_id:853)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'uplink is not treated as putty' span_id:860))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:864) 
          (Token
            id: Id.Lit_Chars
            val: '\tcopy_ssh_wrapper_as "$TRASH_DIRECTORY/uplink" &&\n'
            span_id: 865
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone "[myhost:123]:src" ssh-bracket-clone-uplink &&\n'
            span_id: 866
          ) (Token id:Id.Lit_Chars val:'\texpect_ssh "-p 123" myhost src\n' span_id:867)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'plink is treated specially (as putty)' span_id:874))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:878) 
          (Token
            id: Id.Lit_Chars
            val: '\tcopy_ssh_wrapper_as "$TRASH_DIRECTORY/plink" &&\n'
            span_id: 879
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone "[myhost:123]:src" ssh-bracket-clone-plink-0 &&\n'
            span_id: 880
          ) (Token id:Id.Lit_Chars val:'\texpect_ssh "-P 123" myhost src\n' span_id:881)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'plink.exe is treated specially (as putty)' span_id:888))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:892) 
          (Token
            id: Id.Lit_Chars
            val: '\tcopy_ssh_wrapper_as "$TRASH_DIRECTORY/plink.exe" &&\n'
            span_id: 893
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone "[myhost:123]:src" ssh-bracket-clone-plink-1 &&\n'
            span_id: 894
          ) (Token id:Id.Lit_Chars val:'\texpect_ssh "-P 123" myhost src\n' span_id:895)
        )
      }
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'tortoiseplink is like putty, with extra arguments'
            span_id: 902
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:906) 
          (Token
            id: Id.Lit_Chars
            val: '\tcopy_ssh_wrapper_as "$TRASH_DIRECTORY/tortoiseplink" &&\n'
            span_id: 907
          ) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone "[myhost:123]:src" ssh-bracket-clone-plink-2 &&\n'
            span_id: 908
          ) (Token id:Id.Lit_Chars val:'\texpect_ssh "-batch -P 123" myhost src\n' span_id:909)
        )
      }
    )
    (C {(setup_ssh_wrapper)})
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:counter)
          op: assign_op.Equal
          rhs: {(0)}
          spids: [919]
        )
      ]
    )
    (command.ShFunction
      name: test_clone_url
      body: 
        (command.BraceGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:counter)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (word_part.ArithSub
                        anode: 
                          (arith_expr.Binary
                            op_id: Id.Arith_Plus
                            left: (arith_expr.ArithWord w:{($ Id.VSub_DollarName '$counter')})
                            right: (arith_expr.ArithWord w:{(Id.Lit_Digits 1)})
                          )
                      )
                    }
                  spids: [939]
                )
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (C {(test_might_fail)} {(git)} {(clone)} {(DQ ($ Id.VSub_Number '$1'))} 
                  {(tmp) ($ Id.VSub_DollarName '$counter')}
                )
                (C {(shift)})
                (C {(expect_ssh)} {(DQ ($ Id.VSub_At '$@'))})
              ]
            )
          ]
        )
    )
    (C {(test_expect_success)} {(Id.KW_Bang '!') (MINGW)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone c:temp is ssl' span_id:986))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:990) 
          (Token id:Id.Lit_Chars val:'\ttest_clone_url c:temp c temp\n' span_id:991)
        )
      }
    )
    (C {(test_expect_success)} {(MINGW)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone c:temp is dos drive' span_id:1000))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1004) 
          (Token id:Id.Lit_Chars val:'\ttest_clone_url c:temp none\n' span_id:1005)
        )
      }
    )
    (command.ForEach
      iter_name: repo
      iter_words: [{(rep)} {(rep/home/project)} {(123)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ('clone host:') ($ Id.VSub_DollarName '$repo'))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1035) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest_clone_url host:$repo host $repo\n'
                    span_id: 1036
                  ) (Token id:Id.Lit_Chars val:'\t' span_id:1037)
                )
              }
            )
          ]
        )
    )
    (command.ForEach
      iter_name: repo
      iter_words: [{(rep)} {(rep/home/project)} {(123)}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ('clone [::1]:') ($ Id.VSub_DollarName '$repo'))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1069) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest_clone_url [::1]:$repo ::1 "$repo"\n'
                    span_id: 1070
                  ) (Token id:Id.Lit_Chars val:'\t' span_id:1071)
                )
              }
            )
          ]
        )
    )
    (C {(test_expect_success)} {(DQ ('clone host:/~repo'))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1086) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_clone_url host:/~repo host "~repo"\n'
            span_id: 1087
          )
        )
      }
    )
    (C {(test_expect_success)} {(DQ ('clone [::1]:/~repo'))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1098) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_clone_url [::1]:/~repo ::1 "~repo"\n'
            span_id: 1099
          )
        )
      }
    )
    (command.ForEach
      iter_name: url
      iter_words: [
        {(foo/bar) (Id.Lit_Other ':') (baz)}
        {(Id.Lit_LBracket '[') (foo) (Id.Lit_RBracket ']') (bar/baz) (Id.Lit_Other ':') (qux)}
        {(Id.Lit_LBracket '[') (foo/bar) (Id.Lit_RBracket ']') (Id.Lit_Other ':') (baz)}
      ]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} {(DQ ('clone ') ($ Id.VSub_DollarName '$url') (' is not ssh'))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1141) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\t\ttest_clone_url $url none\n'
                    span_id: 1142
                  ) (Token id:Id.Lit_Chars val:'\t' span_id:1143)
                )
              }
            )
          ]
        )
    )
    (command.ForEach
      iter_name: tcol
      iter_words: [{(DQ )} {(Id.Lit_Other ':')}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (C {(test_expect_success)} 
              {(DQ ('clone ssh://host.xz') ($ Id.VSub_DollarName '$tcol') (/home/user/repo))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1178) 
                  (Token
                    id: Id.Lit_Chars
                    val: 
'\t\ttest_clone_url "ssh://host.xz$tcol/home/user/repo" host.xz /home/user/repo\n'
                    span_id: 1179
                  ) (Token id:Id.Lit_Chars val:'\t' span_id:1180)
                )
              }
            )
            (C {(test_expect_success)} 
              {(DQ ('clone ssh://host.xz') ($ Id.VSub_DollarName '$tcol') ('/~repo'))} 
              {
                (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1197) 
                  (Token
                    id: Id.Lit_Chars
                    val: '\ttest_clone_url "ssh://host.xz$tcol/~repo" host.xz "~repo"\n'
                    span_id: 1198
                  )
                )
              }
            )
          ]
        )
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone ssh://host.xz:22/home/user/repo' span_id:1210))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1214) 
          (Token
            id: Id.Lit_Chars
            val: 
'\ttest_clone_url "ssh://host.xz:22/home/user/repo" "-p 22 host.xz" "/home/user/repo"\n'
            span_id: 1215
          )
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'clone ssh://host.xz:22/~repo' span_id:1225))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1229) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_clone_url "ssh://host.xz:22/~repo" "-p 22 host.xz" "~repo"\n'
            span_id: 1230
          )
        )
      }
    )
    (command.ForEach
      iter_name: tuah
      iter_words: [
        {(Id.Lit_Other ':') (Id.Lit_Other ':') (1)}
        {(Id.Lit_LBracket '[') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) (Id.Lit_RBracket ']')}
        {(Id.Lit_LBracket '[') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) (Id.Lit_RBracket ']') 
          (Id.Lit_Other ':')
        }
        {(user) (Id.Lit_Other '@') (Id.Lit_Other ':') (Id.Lit_Other ':') (1)}
        {(user) (Id.Lit_Other '@') (Id.Lit_LBracket '[') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) 
          (Id.Lit_RBracket ']')
        }
        {(user) (Id.Lit_Other '@') (Id.Lit_LBracket '[') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) 
          (Id.Lit_RBracket ']') (Id.Lit_Other ':')
        }
        {(Id.Lit_LBracket '[') (user) (Id.Lit_Other '@') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) 
          (Id.Lit_RBracket ']')
        }
        {(Id.Lit_LBracket '[') (user) (Id.Lit_Other '@') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) 
          (Id.Lit_RBracket ']') (Id.Lit_Other ':')
        }
      ]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:ehost)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1304)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {($ Id.VSub_DollarName '$tuah')})
                                  (C {(sed)} {(-e)} {(DQ ('s/1]:/1]/'))})
                                  (C {(tr)} {(-d)} {(DQ ('[]'))})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [1303]
                )
              ]
            )
            (C {(test_expect_success)} 
              {(DQ ('clone ssh://') ($ Id.VSub_DollarName '$tuah') (/home/user/repo))} 
              {
                (DQ ('\n') ('\t  test_clone_url ssh://') ($ Id.VSub_DollarName '$tuah') 
                  ('/home/user/repo ') ($ Id.VSub_DollarName '$ehost') (' /home/user/repo\n') ('\t')
                )
              }
            )
          ]
        )
    )
    (command.ForEach
      iter_name: tuah
      iter_words: [
        {(Id.Lit_Other ':') (Id.Lit_Other ':') (1)}
        {(Id.Lit_LBracket '[') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) (Id.Lit_RBracket ']')}
        {(user) (Id.Lit_Other '@') (Id.Lit_Other ':') (Id.Lit_Other ':') (1)}
        {(user) (Id.Lit_Other '@') (Id.Lit_LBracket '[') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) 
          (Id.Lit_RBracket ']')
        }
        {(Id.Lit_LBracket '[') (user) (Id.Lit_Other '@') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) 
          (Id.Lit_RBracket ']')
        }
      ]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:euah)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1397)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {($ Id.VSub_DollarName '$tuah')})
                                  (C {(tr)} {(-d)} {(DQ ('[]'))})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [1396]
                )
              ]
            )
            (C {(test_expect_success)} {(DQ ('clone ssh://') ($ Id.VSub_DollarName '$tuah') ('/~repo'))} 
              {
                (DQ ('\n') ('\t  test_clone_url ssh://') ($ Id.VSub_DollarName '$tuah') ('/~repo ') 
                  ($ Id.VSub_DollarName '$euah') (" '~repo'\n") ('\t')
                )
              }
            )
          ]
        )
    )
    (command.ForEach
      iter_name: tuah
      iter_words: [
        {(Id.Lit_LBracket '[') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) (Id.Lit_RBracket ']')}
        {(user) (Id.Lit_Other '@') (Id.Lit_LBracket '[') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) 
          (Id.Lit_RBracket ']')
        }
        {(Id.Lit_LBracket '[') (user) (Id.Lit_Other '@') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) 
          (Id.Lit_RBracket ']')
        }
      ]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:euah)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1470)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {($ Id.VSub_DollarName '$tuah')})
                                  (C {(tr)} {(-d)} {(DQ ('[]'))})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [1469]
                )
              ]
            )
            (C {(test_expect_success)} 
              {(DQ ('clone ssh://') ($ Id.VSub_DollarName '$tuah') (':22/home/user/repo'))} 
              {
                (DQ ('\n') ('\t  test_clone_url ssh://') ($ Id.VSub_DollarName '$tuah') 
                  (":22/home/user/repo '-p 22' ") ($ Id.VSub_DollarName '$euah') (' /home/user/repo\n') ('\t')
                )
              }
            )
          ]
        )
    )
    (command.ForEach
      iter_name: tuah
      iter_words: [
        {(Id.Lit_LBracket '[') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) (Id.Lit_RBracket ']')}
        {(user) (Id.Lit_Other '@') (Id.Lit_LBracket '[') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) 
          (Id.Lit_RBracket ']')
        }
        {(Id.Lit_LBracket '[') (user) (Id.Lit_Other '@') (Id.Lit_Other ':') (Id.Lit_Other ':') (1) 
          (Id.Lit_RBracket ']')
        }
      ]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.ShAssignment
              pairs: [
                (assign_pair
                  lhs: (sh_lhs_expr.Name name:euah)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (command_sub
                        left_token: (Token id:Id.Left_DollarParen val:'$(' span_id:1543)
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {($ Id.VSub_DollarName '$tuah')})
                                  (C {(tr)} {(-d)} {(DQ ('[]'))})
                                ]
                                negated: F
                              )
                            ]
                          )
                      )
                    }
                  spids: [1542]
                )
              ]
            )
            (C {(test_expect_success)} 
              {(DQ ('clone ssh://') ($ Id.VSub_DollarName '$tuah') (':22/~repo'))} 
              {
                (DQ ('\n') ('\t  test_clone_url ssh://') ($ Id.VSub_DollarName '$tuah') 
                  (":22/~repo '-p 22' ") ($ Id.VSub_DollarName '$euah') (" '~repo'\n") ('\t')
                )
              }
            )
          ]
        )
    )
    (C {(test_expect_success)} 
      {
        (SQ 
          (Token
            id: Id.Lit_Chars
            val: 'clone from a repository with two identical branches'
            span_id: 1584
          )
        )
      } 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1588) 
          (Token id:Id.Lit_Chars val:'\n' span_id:1589) (Token id:Id.Lit_Chars val:'\t(\n' span_id:1590) 
          (Token id:Id.Lit_Chars val:'\t\tcd src &&\n' span_id:1591) (Token id:Id.Lit_Chars val:'\t\tgit checkout -b another master\n' span_id:1592) 
          (Token id:Id.Lit_Chars val:'\t) &&\n' span_id:1593) (Token id:Id.Lit_Chars val:'\tgit clone src target-11 &&\n' span_id:1594) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest "z$( cd target-11 && git symbolic-ref HEAD )" = zrefs/heads/another\n'
            span_id: 1595
          ) (Token id:Id.Lit_Chars val:'\n' span_id:1596)
        )
      }
    )
    (C {(test_expect_success)} {(SQ (Token id:Id.Lit_Chars val:'shallow clone locally' span_id:1603))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1607) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit clone --depth=1 --no-local src ssrrcc &&\n'
            span_id: 1608
          ) (Token id:Id.Lit_Chars val:'\tgit clone ssrrcc ddsstt &&\n' span_id:1609) 
          (Token
            id: Id.Lit_Chars
            val: '\ttest_cmp ssrrcc/.git/shallow ddsstt/.git/shallow &&\n'
            span_id: 1610
          ) (Token id:Id.Lit_Chars val:'\t( cd ddsstt && git fsck )\n' span_id:1611)
        )
      }
    )
    (C {(test_expect_success)} 
      {(SQ (Token id:Id.Lit_Chars val:'GIT_TRACE_PACKFILE produces a usable pack' span_id:1618))} 
      {
        (SQ (Token id:Id.Lit_Chars val:'\n' span_id:1622) 
          (Token id:Id.Lit_Chars val:'\trm -rf dst.git &&\n' span_id:1623) 
          (Token
            id: Id.Lit_Chars
            val: '\tGIT_TRACE_PACKFILE=$PWD/tmp.pack git clone --no-local --bare src dst.git &&\n'
            span_id: 1624
          ) (Token id:Id.Lit_Chars val:'\tgit init --bare replay.git &&\n' span_id:1625) 
          (Token
            id: Id.Lit_Chars
            val: '\tgit -C replay.git index-pack -v --stdin <tmp.pack\n'
            span_id: 1626
          )
        )
      }
    )
    (C {(test_done)})
  ]
)