(command.CommandList
  children: [
    (command.ShAssignment
      left: <Id.Lit_VarLike 'test_description='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'test_description='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'test_description='> name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'test git rev-parse diagnosis for invalid argument'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <exec>
      more_env: []
      words: [{<exec>}]
      redirects: [(Redir op:<Id.Redir_Less '<'> loc:(redir_loc.Fd fd:0) arg:{<'/dev/null'>})]
      do_fork: T
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <test_did_you_mean>
      name: test_did_you_mean
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'sq='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'sq='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'sq='> name:sq)
                      op: assign_op.Equal
                      rhs: {(DQ <'\''>)}
                    )
                  ]
                  redirects: []
                )
                (command.Simple
                  blame_tok: <cat>
                  more_env: []
                  words: [{<cat>}]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Great '>'>
                      loc: (redir_loc.Fd fd:1)
                      arg: {<expected>}
                    )
                    (Redir
                      op: <Id.Redir_DLessDash '<<-'>
                      loc: (redir_loc.Fd fd:0)
                      arg: 
                        (redir_param.HereDoc
                          here_begin: {<EOF>}
                          here_end_tok: <Id.Undefined_Tok ''>
                          stdin_parts: [
                            <'fatal: Path \''>
                            ($ Id.VSub_Number 2)
                            ($ Id.VSub_Number 3)
                            <'\' '>
                            ($ Id.VSub_Number 4)
                            <', but not '>
                            (BracedVarSub
                              left: <Id.Left_DollarBrace '${'>
                              token: <Id.VSub_Number 5>
                              var_name: 5
                              suffix_op: 
                                (suffix_op.Unary
                                  op: <Id.VTest_ColonHyphen _>
                                  arg_word: 
                                    {($ Id.VSub_DollarName sq) ($ Id.VSub_Number 3) 
                                      ($ Id.VSub_DollarName sq)
                                    }
                                )
                              right: <Id.Right_DollarBrace '}'>
                            )
                            <'.\n'>
                            <'Did you mean \''>
                            ($ Id.VSub_Number 1)
                            <':'>
                            ($ Id.VSub_Number 2)
                            ($ Id.VSub_Number 3)
                            <'\''>
                            (BracedVarSub
                              left: <Id.Left_DollarBrace '${'>
                              token: <Id.VSub_Number 2>
                              var_name: 2
                              suffix_op: 
                                (suffix_op.Unary
                                  op: <Id.VTest_ColonPlus _>
                                  arg_word: 
                                    {<' aka '> ($ Id.VSub_DollarName sq) ($ Id.VSub_Number 1) <':.'> 
                                      <Id.Lit_Slash '/'> ($ Id.VSub_Number 3) ($ Id.VSub_DollarName sq)
                                    }
                                )
                              right: <Id.Right_DollarBrace '}'>
                            )
                            <'?\n'>
                          ]
                        )
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <test_cmp>
                  more_env: []
                  words: [{<test_cmp>} {<expected>} {<error>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'HASH_file='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'HASH_file='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'HASH_file='> name:HASH_file)
          op: assign_op.Equal
          rhs: (rhs_word__Empty)
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'set up basic repo'>)}
        {
          (SQ <'\n'> <'\techo one > file.txt &&\n'> <'\tmkdir subdir &&\n'> 
            <'\techo two > subdir/file.txt &&\n'> <'\techo three > subdir/file2.txt &&\n'> <'\tgit add . &&\n'> <'\tgit commit -m init &&\n'> 
            <'\techo four > index-only.txt &&\n'> <'\tgit add index-only.txt &&\n'> <'\techo five > disk-only.txt\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'correct file objects'>)}
        {
          (SQ <'\n'> <'\tHASH_file=$(git rev-parse HEAD:file.txt) &&\n'> 
            <'\tgit rev-parse HEAD:subdir/file.txt &&\n'> <'\tgit rev-parse :index-only.txt &&\n'> <'\t(cd subdir &&\n'> 
            <'\t git rev-parse HEAD:subdir/file2.txt &&\n'> <'\t test $HASH_file = $(git rev-parse HEAD:file.txt) &&\n'> 
            <'\t test $HASH_file = $(git rev-parse :file.txt) &&\n'> <'\t test $HASH_file = $(git rev-parse :0:file.txt) )\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'correct relative file objects (0)'>)}
        {
          (SQ <'\n'> <'\tgit rev-parse :file.txt >expected &&\n'> 
            <'\tgit rev-parse :./file.txt >result &&\n'> <'\ttest_cmp expected result &&\n'> <'\tgit rev-parse :0:./file.txt >result &&\n'> 
            <'\ttest_cmp expected result\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'correct relative file objects (1)'>)}
        {
          (SQ <'\n'> <'\tgit rev-parse HEAD:file.txt >expected &&\n'> 
            <'\tgit rev-parse HEAD:./file.txt >result &&\n'> <'\ttest_cmp expected result\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'correct relative file objects (2)'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd subdir &&\n'> 
            <'\t\tgit rev-parse HEAD:../file.txt >result &&\n'> <'\t\ttest_cmp ../expected result\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'correct relative file objects (3)'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd subdir &&\n'> 
            <'\t\tgit rev-parse HEAD:../subdir/../file.txt >result &&\n'> <'\t\ttest_cmp ../expected result\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'correct relative file objects (4)'>)}
        {
          (SQ <'\n'> <'\tgit rev-parse HEAD:subdir/file.txt >expected &&\n'> <'\t(\n'> 
            <'\t\tcd subdir &&\n'> <'\t\tgit rev-parse HEAD:./file.txt >result &&\n'> <'\t\ttest_cmp ../expected result\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'correct relative file objects (5)'>)}
        {
          (SQ <'\n'> <'\tgit rev-parse :subdir/file.txt >expected &&\n'> <'\t(\n'> 
            <'\t\tcd subdir &&\n'> <'\t\tgit rev-parse :./file.txt >result &&\n'> <'\t\ttest_cmp ../expected result &&\n'> 
            <'\t\tgit rev-parse :0:./file.txt >result &&\n'> <'\t\ttest_cmp ../expected result\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'correct relative file objects (6)'>)}
        {
          (SQ <'\n'> <'\tgit rev-parse :file.txt >expected &&\n'> <'\t(\n'> <'\t\tcd subdir &&\n'> 
            <'\t\tgit rev-parse :../file.txt >result &&\n'> <'\t\ttest_cmp ../expected result &&\n'> <'\t\tgit rev-parse :0:../file.txt >result &&\n'> 
            <'\t\ttest_cmp ../expected result\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'incorrect revision id'>)}
        {
          (SQ <'\n'> <'\ttest_must_fail git rev-parse foobar:file.txt 2>error &&\n'> 
            <'\tgrep "Invalid object name '>
          ) (DQ <'\''>) (SQ <foobar>) (DQ <'\''>) 
          (SQ <'." error &&\n'> <'\ttest_must_fail git rev-parse foobar 2> error &&\n'> 
            <'\ttest_i18ngrep "unknown revision or path not in the working tree." error\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'incorrect file in sha1:path'>)}
        {
          (SQ <'\n'> <'\ttest_must_fail git rev-parse HEAD:nothing.txt 2> error &&\n'> 
            <'\tgrep "fatal: Path '>
          ) (DQ <'\''>) (SQ <nothing.txt>) (DQ <'\''>) (SQ <' does not exist in '>) (DQ <'\''>) (SQ <HEAD>) (DQ <'\''>) 
          (SQ <'" error &&\n'> <'\ttest_must_fail git rev-parse HEAD:index-only.txt 2> error &&\n'> 
            <'\tgrep "fatal: Path '>
          ) (DQ <'\''>) (SQ <index-only.txt>) (DQ <'\''>) (SQ <' exists on disk, but not in '>) (DQ <'\''>) (SQ <HEAD>) 
          (DQ <'\''>) 
          (SQ <'." error &&\n'> <'\t(cd subdir &&\n'> 
            <'\t test_must_fail git rev-parse HEAD:file2.txt 2> error &&\n'> <'\t test_did_you_mean HEAD subdir/ file2.txt exists )\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'incorrect file in :path and :N:path'>)}
        {
          (SQ <'\n'> <'\ttest_must_fail git rev-parse :nothing.txt 2> error &&\n'> 
            <'\tgrep "fatal: Path '>
          ) (DQ <'\''>) (SQ <nothing.txt>) (DQ <'\''>) 
          (SQ <' does not exist (neither on disk nor in the index)." error &&\n'> 
            <'\ttest_must_fail git rev-parse :1:nothing.txt 2> error &&\n'> <'\tgrep "Path '>
          ) (DQ <'\''>) (SQ <nothing.txt>) (DQ <'\''>) 
          (SQ <' does not exist (neither on disk nor in the index)." error &&\n'> 
            <'\ttest_must_fail git rev-parse :1:file.txt 2> error &&\n'> <'\ttest_did_you_mean ":0" "" file.txt "is in the index" "at stage 1" &&\n'> <'\t(cd subdir &&\n'> 
            <'\t test_must_fail git rev-parse :1:file.txt 2> error &&\n'> <'\t test_did_you_mean ":0" "" file.txt "is in the index" "at stage 1" &&\n'> 
            <'\t test_must_fail git rev-parse :file2.txt 2> error &&\n'> <'\t test_did_you_mean ":0" subdir/ file2.txt "is in the index" &&\n'> 
            <'\t test_must_fail git rev-parse :2:file2.txt 2> error &&\n'> <'\t test_did_you_mean :0 subdir/ file2.txt "is in the index") &&\n'> 
            <'\ttest_must_fail git rev-parse :disk-only.txt 2> error &&\n'> <'\tgrep "fatal: Path '>
          ) (DQ <'\''>) (SQ <disk-only.txt>) (DQ <'\''>) (SQ <' exists on disk, but not in the index." error\n'>)
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'invalid @{n} reference'>)}
        {
          (SQ <'\n'> <'\ttest_must_fail git rev-parse master@{99999} >output 2>error &&\n'> 
            <'\ttest -z "$(cat output)" &&\n'> <'\tgrep "fatal: Log for [^ ]* only has [0-9][0-9]* entries." error  &&\n'> 
            <'\ttest_must_fail git rev-parse --verify master@{99999} >output 2>error &&\n'> <'\ttest -z "$(cat output)" &&\n'> 
            <'\tgrep "fatal: Log for [^ ]* only has [0-9][0-9]* entries." error\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'relative path not found'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tcd subdir &&\n'> 
            <'\t\ttest_must_fail git rev-parse HEAD:./nonexistent.txt 2>error &&\n'> <'\t\tgrep subdir/nonexistent.txt error\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'relative path outside worktree'>)}
        {
          (SQ <'\n'> <'\ttest_must_fail git rev-parse HEAD:../file.txt >output 2>error &&\n'> 
            <'\ttest -z "$(cat output)" &&\n'> <'\tgrep "outside repository" error\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'relative path when cwd is outside worktree'>)}
        {
          (SQ <'\n'> 
            <
'\ttest_must_fail git --git-dir=.git --work-tree=subdir rev-parse HEAD:./file.txt >output 2>error &&\n'
            > <'\ttest -z "$(cat output)" &&\n'> 
            <'\tgrep "relative path syntax can.t be used outside working tree." error\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'<commit>:file correctly diagnosed after a pathname'>)}
        {
          (SQ <'\n'> <'\ttest_must_fail git rev-parse file.txt HEAD:file.txt 1>actual 2>error &&\n'> 
            <'\ttest_i18ngrep ! "exists on disk" error &&\n'> <'\ttest_i18ngrep "no such path in the working tree" error &&\n'> <'\tcat >expect <<-\\EOF &&\n'> 
            <'\tfile.txt\n'> <'\tHEAD:file.txt\n'> <'\tEOF\n'> <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'dotdot is not an empty set'>)}
        {
          (SQ <'\n'> <'\t( H=$(git rev-parse HEAD) && echo $H && echo ^$H ) >expect &&\n'> <'\n'> 
            <'\tgit rev-parse HEAD.. >actual &&\n'> <'\ttest_cmp expect actual &&\n'> <'\n'> <'\tgit rev-parse ..HEAD >actual &&\n'> 
            <'\ttest_cmp expect actual &&\n'> <'\n'> <'\techo .. >expect &&\n'> <'\tgit rev-parse .. >actual &&\n'> <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'arg before dashdash must be a revision (missing)'>)}
        {
          (SQ <'\n'> <'\ttest_must_fail git rev-parse foobar -- 2>stderr &&\n'> 
            <'\ttest_i18ngrep "bad revision" stderr\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'arg before dashdash must be a revision (file)'>)}
        {
          (SQ <'\n'> <'\t>foobar &&\n'> <'\ttest_must_fail git rev-parse foobar -- 2>stderr &&\n'> 
            <'\ttest_i18ngrep "bad revision" stderr\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'arg before dashdash must be a revision (ambiguous)'>)}
        {
          (SQ <'\n'> <'\t>foobar &&\n'> <'\tgit update-ref refs/heads/foobar HEAD &&\n'> <'\t{\n'> 
            <'\t\t# we do not want to use rev-parse here, because\n'> <'\t\t# we are testing it\n'> <'\t\tcat .git/refs/heads/foobar &&\n'> <'\t\tprintf "%s\\n" --\n'> 
            <'\t} >expect &&\n'> <'\tgit rev-parse foobar -- >actual &&\n'> <'\ttest_cmp expect actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)