(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'push from/to a shallow clone over http'>)}
          spids: [4]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (C {<.>} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) <'/lib-httpd.sh'>})
    (C {<start_httpd>})
    (command.ShFunction
      name: commit
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp]
              children: [
                (command.Simple
                  words: [{<echo>} {(DQ ($ Id.VSub_Number '$1'))}]
                  redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<tracked>})]
                  do_fork: T
                )
                (C {<git>} {<add>} {<tracked>})
                (C {<git>} {<commit>} {<-m>} {(DQ ($ Id.VSub_Number '$1'))})
              ]
            )
          ]
        )
    )
    (C {<test_expect_success>} {(SQ <setup>)} 
      {
        (SQ <'\n'> <'\tgit config --global transfer.fsckObjects true &&\n'> <'\tcommit 1 &&\n'> 
          <'\tcommit 2 &&\n'> <'\tcommit 3 &&\n'> <'\tcommit 4 &&\n'> <'\tgit clone . full &&\n'> <'\t(\n'> 
          <'\tgit init full-abc &&\n'> <'\tcd full-abc &&\n'> <'\tcommit a &&\n'> <'\tcommit b &&\n'> <'\tcommit c\n'> <'\t) &&\n'> 
          <'\tgit clone --no-local --depth=2 .git shallow &&\n'> <'\tgit --git-dir=shallow/.git log --format=%s >actual &&\n'> <'\tcat <<EOF >expect &&\n'> <'4\n'> 
          <'3\n'> <'EOF\n'> <'\ttest_cmp expect actual &&\n'> 
          <'\tgit clone --no-local --depth=2 full-abc/.git shallow2 &&\n'> <'\tgit --git-dir=shallow2/.git log --format=%s >actual &&\n'> <'\tcat <<EOF >expect &&\n'> <'c\n'> 
          <'b\n'> <'EOF\n'> <'\ttest_cmp expect actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'push to shallow repo via http'>)} 
      {
        (SQ <'\n'> <'\tgit clone --bare --no-local shallow "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&\n'> 
          <'\t(\n'> <'\tcd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&\n'> <'\tgit config http.receivepack true\n'> 
          <'\t) &&\n'> <'\t(\n'> <'\tcd full &&\n'> <'\tcommit 9 &&\n'> 
          <'\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master\n'> <'\t) &&\n'> <'\t(\n'> <'\tcd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&\n'> <'\tgit fsck &&\n'> 
          <'\tgit log --format=%s top/master >actual &&\n'> <'\tcat <<EOF >expect &&\n'> <'9\n'> <'4\n'> <'3\n'> <'EOF\n'> <'\ttest_cmp expect actual\n'> <'\t)\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'push from shallow repo via http'>)} 
      {
        (SQ <'\n'> <'\tmv "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" shallow-upstream.git &&\n'> 
          <'\tgit clone --bare --no-local full "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&\n'> <'\t(\n'> <'\tcd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&\n'> <'\tgit config http.receivepack true\n'> 
          <'\t) &&\n'> <'\tcommit 10 &&\n'> <'\tgit push $HTTPD_URL/smart/repo.git +master:refs/remotes/top/master &&\n'> 
          <'\t(\n'> <'\tcd "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" &&\n'> <'\tgit fsck &&\n'> 
          <'\tgit log --format=%s top/master >actual &&\n'> <'\tcat <<EOF >expect &&\n'> <'10\n'> <'4\n'> <'3\n'> <'2\n'> <'1\n'> <'EOF\n'> 
          <'\ttest_cmp expect actual\n'> <'\t)\n'>
        )
      }
    )
    (C {<stop_httpd>})
    (C {<test_done>})
  ]
)