(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'--all includes detached HEADs'>)}
          spids: [4]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (command.ShFunction
      name: commit
      body: 
        (BraceGroup
          children: [
            (command.AndOr
              ops: [Id.Op_DAmp Id.Op_DAmp Id.Op_DAmp]
              children: [
                (C {<test_tick>})
                (command.Simple
                  words: [{<echo>} {($ Id.VSub_Number '$1')}]
                  redirects: [(redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<foo>})]
                  do_fork: T
                )
                (C {<git>} {<add>} {<foo>})
                (C {<git>} {<commit>} {<-m>} {(DQ ($ Id.VSub_Number '$1'))})
              ]
            )
          ]
        )
    )
    (C {<test_expect_success>} {(SQ <setup>)} 
      {
        (SQ <'\n'> <'\n'> <'\tcommit one &&\n'> <'\tcommit two &&\n'> <'\tgit checkout HEAD^ &&\n'> 
          <'\tcommit detached\n'> <'\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'rev-list --all lists detached HEAD'>)} 
      {(SQ <'\n'> <'\n'> <'\ttest 3 = $(git rev-list --all | wc -l)\n'> <'\n'>)}
    )
    (C {<test_expect_success>} {(SQ <'repack does not lose detached HEAD'>)} 
      {
        (SQ <'\n'> <'\n'> <'\tgit gc &&\n'> <'\tgit prune --expire=now &&\n'> <'\tgit show HEAD\n'> <'\n'>)
      }
    )
    (C {<test_expect_success>} {(SQ <'rev-list --graph --no-walk is forbidden'>)} 
      {(SQ <'\n'> <'\ttest_must_fail git rev-list --graph --no-walk HEAD\n'>)}
    )
    (C {<test_done>})
  ]
)