(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 update-ref error handling'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <test_update_rejected>
      name: test_update_rejected
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.AndOr
              children: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'before='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'before='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'before='> name:before)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number 1))}
                    )
                  ]
                  redirects: []
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'pack='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'pack='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'pack='> name:pack)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number 2))}
                    )
                  ]
                  redirects: []
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'create='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'create='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'create='> name:create)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number 3))}
                    )
                  ]
                  redirects: []
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'error='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'error='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'error='> name:error)
                      op: assign_op.Equal
                      rhs: {(DQ ($ Id.VSub_Number 4))}
                    )
                  ]
                  redirects: []
                )
                (command.Pipeline
                  children: [
                    (command.Simple
                      blame_tok: <printf>
                      more_env: []
                      words: [
                        {<printf>}
                        {
                          (DQ <'create '> ($ Id.VSub_DollarName prefix) <'/%s '> 
                            ($ Id.VSub_DollarName C) <Id.Lit_BadBackslash '\\'> <n>
                          )
                        }
                        {($ Id.VSub_DollarName before)}
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <git>
                      more_env: []
                      words: [{<git>} {<update-ref>} {<--stdin>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  ops: [<Id.Op_Pipe _>]
                )
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<for-each-ref>} {($ Id.VSub_DollarName prefix)}]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<unchanged>})]
                  do_fork: T
                )
                (command.If
                  if_kw: <Id.KW_If if>
                  arms: [
                    (IfArm
                      keyword: <Id.KW_If if>
                      cond: 
                        (condition.Shell
                          commands: [
                            (command.Simple
                              blame_tok: <Id.VSub_DollarName '$pack'>
                              more_env: []
                              words: [{($ Id.VSub_DollarName pack)}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                        )
                      then_kw: <Id.KW_Then then>
                      action: [
                        (command.Simple
                          blame_tok: <git>
                          more_env: []
                          words: [{<git>} {<pack-refs>} {<--all>}]
                          redirects: []
                          do_fork: T
                        )
                      ]
                      spids: [121 126]
                    )
                  ]
                  else_action: []
                  fi_kw: <Id.KW_Fi fi>
                  redirects: []
                )
                (command.Simple
                  blame_tok: <printf>
                  more_env: []
                  words: [
                    {<printf>}
                    {
                      (DQ <'create '> ($ Id.VSub_DollarName prefix) <'/%s '> ($ Id.VSub_DollarName C) 
                        <Id.Lit_BadBackslash '\\'> <n>
                      )
                    }
                    {($ Id.VSub_DollarName create)}
                  ]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<input>})]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <test_must_fail>
                  more_env: []
                  words: [{<test_must_fail>} {<git>} {<update-ref>} {<--stdin>}]
                  redirects: [
                    (Redir
                      op: <Id.Redir_Less '<'>
                      loc: (redir_loc.Fd fd:0)
                      arg: {<input>}
                    )
                    (Redir
                      op: <Id.Redir_Great '2>'>
                      loc: (redir_loc.Fd fd:2)
                      arg: {<output.err>}
                    )
                  ]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <grep>
                  more_env: []
                  words: [{<grep>} {<-F>} {(DQ ($ Id.VSub_DollarName error))} {<output.err>}]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <git>
                  more_env: []
                  words: [{<git>} {<for-each-ref>} {($ Id.VSub_DollarName prefix)}]
                  redirects: [(Redir op:<Id.Redir_Great '>'> loc:(redir_loc.Fd fd:1) arg:{<actual>})]
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <test_cmp>
                  more_env: []
                  words: [{<test_cmp>} {<unchanged>} {<actual>}]
                  redirects: []
                  do_fork: T
                )
              ]
              ops: [
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
                <Id.Op_DAmp _>
              ]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'Q='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'Q='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'Q='> name:Q)
          op: assign_op.Equal
          rhs: {(DQ <'\''>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <setup>)}
        {
          (SQ <'\n'> <'\n'> <'\tgit commit --allow-empty -m Initial &&\n'> 
            <'\tC=$(git rev-parse HEAD) &&\n'> <'\tgit commit --allow-empty -m Second &&\n'> <'\tD=$(git rev-parse HEAD) &&\n'> 
            <'\tgit commit --allow-empty -m Third &&\n'> <'\tE=$(git rev-parse HEAD)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'existing loose ref is a simple prefix of new'>)}
        {
          (SQ <'\n'> <'\n'> <'\tprefix=refs/1l &&\n'> 
            <'\ttest_update_rejected "a c e" false "b c/x d" \\\n'> <'\t\t"$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x$Q"\n'> <'\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'existing packed ref is a simple prefix of new'>)}
        {
          (SQ <'\n'> <'\n'> <'\tprefix=refs/1p &&\n'> 
            <'\ttest_update_rejected "a c e" true "b c/x d" \\\n'> <'\t\t"$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x$Q"\n'> <'\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'existing loose ref is a deeper prefix of new'>)}
        {
          (SQ <'\n'> <'\n'> <'\tprefix=refs/2l &&\n'> 
            <'\ttest_update_rejected "a c e" false "b c/x/y d" \\\n'> <'\t\t"$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x/y$Q"\n'> <'\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'existing packed ref is a deeper prefix of new'>)}
        {
          (SQ <'\n'> <'\n'> <'\tprefix=refs/2p &&\n'> 
            <'\ttest_update_rejected "a c e" true "b c/x/y d" \\\n'> <'\t\t"$Q$prefix/c$Q exists; cannot create $Q$prefix/c/x/y$Q"\n'> <'\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'new ref is a simple prefix of existing loose'>)}
        {
          (SQ <'\n'> <'\n'> <'\tprefix=refs/3l &&\n'> 
            <'\ttest_update_rejected "a c/x e" false "b c d" \\\n'> <'\t\t"$Q$prefix/c/x$Q exists; cannot create $Q$prefix/c$Q"\n'> <'\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'new ref is a simple prefix of existing packed'>)}
        {
          (SQ <'\n'> <'\n'> <'\tprefix=refs/3p &&\n'> 
            <'\ttest_update_rejected "a c/x e" true "b c d" \\\n'> <'\t\t"$Q$prefix/c/x$Q exists; cannot create $Q$prefix/c$Q"\n'> <'\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'new ref is a deeper prefix of existing loose'>)}
        {
          (SQ <'\n'> <'\n'> <'\tprefix=refs/4l &&\n'> 
            <'\ttest_update_rejected "a c/x/y e" false "b c d" \\\n'> <'\t\t"$Q$prefix/c/x/y$Q exists; cannot create $Q$prefix/c$Q"\n'> <'\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'new ref is a deeper prefix of existing packed'>)}
        {
          (SQ <'\n'> <'\n'> <'\tprefix=refs/4p &&\n'> 
            <'\ttest_update_rejected "a c/x/y e" true "b c d" \\\n'> <'\t\t"$Q$prefix/c/x/y$Q exists; cannot create $Q$prefix/c$Q"\n'> <'\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'one new ref is a simple prefix of another'>)}
        {
          (SQ <'\n'> <'\n'> <'\tprefix=refs/5 &&\n'> 
            <'\ttest_update_rejected "a e" false "b c c/x d" \\\n'> <'\t\t"cannot process $Q$prefix/c$Q and $Q$prefix/c/x$Q at the same time"\n'> <'\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'empty directory should not fool rev-parse'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/e-rev-parse &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> 
            <'\tgit pack-refs --all &&\n'> <'\tmkdir -p .git/$prefix/foo/bar/baz &&\n'> <'\techo "$C" >expected &&\n'> 
            <'\tgit rev-parse $prefix/foo >actual &&\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'empty directory should not fool for-each-ref'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/e-for-each-ref &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> 
            <'\tgit for-each-ref $prefix >expected &&\n'> <'\tgit pack-refs --all &&\n'> <'\tmkdir -p .git/$prefix/foo/bar/baz &&\n'> 
            <'\tgit for-each-ref $prefix >actual &&\n'> <'\ttest_cmp expected actual\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'empty directory should not fool create'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/e-create &&\n'> <'\tmkdir -p .git/$prefix/foo/bar/baz &&\n'> 
            <'\tprintf "create %s $C\\n" $prefix/foo |\n'> <'\tgit update-ref --stdin\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'empty directory should not fool verify'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/e-verify &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> 
            <'\tgit pack-refs --all &&\n'> <'\tmkdir -p .git/$prefix/foo/bar/baz &&\n'> <'\tprintf "verify %s $C\\n" $prefix/foo |\n'> 
            <'\tgit update-ref --stdin\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'empty directory should not fool 1-arg update'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/e-update-1 &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> 
            <'\tgit pack-refs --all &&\n'> <'\tmkdir -p .git/$prefix/foo/bar/baz &&\n'> <'\tprintf "update %s $D\\n" $prefix/foo |\n'> 
            <'\tgit update-ref --stdin\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'empty directory should not fool 2-arg update'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/e-update-2 &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> 
            <'\tgit pack-refs --all &&\n'> <'\tmkdir -p .git/$prefix/foo/bar/baz &&\n'> <'\tprintf "update %s $D $C\\n" $prefix/foo |\n'> 
            <'\tgit update-ref --stdin\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'empty directory should not fool 0-arg delete'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/e-delete-0 &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> 
            <'\tgit pack-refs --all &&\n'> <'\tmkdir -p .git/$prefix/foo/bar/baz &&\n'> <'\tprintf "delete %s\\n" $prefix/foo |\n'> 
            <'\tgit update-ref --stdin\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'empty directory should not fool 1-arg delete'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/e-delete-1 &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> 
            <'\tgit pack-refs --all &&\n'> <'\tmkdir -p .git/$prefix/foo/bar/baz &&\n'> <'\tprintf "delete %s $C\\n" $prefix/foo |\n'> 
            <'\tgit update-ref --stdin\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'missing old value blocks update'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/missing-update &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <
'\tfatal: cannot lock ref $Q$prefix/foo$Q: unable to resolve reference $Q$prefix/foo$Q\n'
            > <'\tEOF\n'> <'\tprintf "%s\\n" "update $prefix/foo $E $D" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'incorrect old value blocks update'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/incorrect-update &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tfatal: cannot lock ref $Q$prefix/foo$Q: is at $C but expected $D\n'> <'\tEOF\n'> 
            <'\tprintf "%s\\n" "update $prefix/foo $E $D" |\n'> <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'existing old value blocks create'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/existing-create &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tfatal: cannot lock ref $Q$prefix/foo$Q: reference already exists\n'> <'\tEOF\n'> 
            <'\tprintf "%s\\n" "create $prefix/foo $E" |\n'> <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'incorrect old value blocks delete'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/incorrect-delete &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> 
            <'\tcat >expected <<-EOF &&\n'> <'\tfatal: cannot lock ref $Q$prefix/foo$Q: is at $C but expected $D\n'> <'\tEOF\n'> 
            <'\tprintf "%s\\n" "delete $prefix/foo $D" |\n'> <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'missing old value blocks indirect update'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/missing-indirect-update &&\n'> 
            <'\tgit symbolic-ref $prefix/symref $prefix/foo &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <
'\tfatal: cannot lock ref $Q$prefix/symref$Q: unable to resolve reference $Q$prefix/foo$Q\n'
            > <'\tEOF\n'> <'\tprintf "%s\\n" "update $prefix/symref $E $D" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'incorrect old value blocks indirect update'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/incorrect-indirect-update &&\n'> 
            <'\tgit symbolic-ref $prefix/symref $prefix/foo &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tfatal: cannot lock ref $Q$prefix/symref$Q: is at $C but expected $D\n'> <'\tEOF\n'> <'\tprintf "%s\\n" "update $prefix/symref $E $D" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'existing old value blocks indirect create'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/existing-indirect-create &&\n'> 
            <'\tgit symbolic-ref $prefix/symref $prefix/foo &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tfatal: cannot lock ref $Q$prefix/symref$Q: reference already exists\n'> <'\tEOF\n'> <'\tprintf "%s\\n" "create $prefix/symref $E" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'incorrect old value blocks indirect delete'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/incorrect-indirect-delete &&\n'> 
            <'\tgit symbolic-ref $prefix/symref $prefix/foo &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tfatal: cannot lock ref $Q$prefix/symref$Q: is at $C but expected $D\n'> <'\tEOF\n'> <'\tprintf "%s\\n" "delete $prefix/symref $D" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'missing old value blocks indirect no-deref update'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/missing-noderef-update &&\n'> 
            <'\tgit symbolic-ref $prefix/symref $prefix/foo &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tfatal: cannot lock ref $Q$prefix/symref$Q: reference is missing but expected $D\n'> <'\tEOF\n'> <'\tprintf "%s\\n" "option no-deref" "update $prefix/symref $E $D" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'incorrect old value blocks indirect no-deref update'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/incorrect-noderef-update &&\n'> 
            <'\tgit symbolic-ref $prefix/symref $prefix/foo &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tfatal: cannot lock ref $Q$prefix/symref$Q: is at $C but expected $D\n'> <'\tEOF\n'> <'\tprintf "%s\\n" "option no-deref" "update $prefix/symref $E $D" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'existing old value blocks indirect no-deref create'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/existing-noderef-create &&\n'> 
            <'\tgit symbolic-ref $prefix/symref $prefix/foo &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tfatal: cannot lock ref $Q$prefix/symref$Q: reference already exists\n'> <'\tEOF\n'> <'\tprintf "%s\\n" "option no-deref" "create $prefix/symref $E" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'incorrect old value blocks indirect no-deref delete'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/incorrect-noderef-delete &&\n'> 
            <'\tgit symbolic-ref $prefix/symref $prefix/foo &&\n'> <'\tgit update-ref $prefix/foo $C &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <'\tfatal: cannot lock ref $Q$prefix/symref$Q: is at $C but expected $D\n'> <'\tEOF\n'> <'\tprintf "%s\\n" "option no-deref" "delete $prefix/symref $D" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'non-empty directory blocks create'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/ne-create &&\n'> <'\tmkdir -p .git/$prefix/foo/bar &&\n'> 
            <'\t: >.git/$prefix/foo/bar/baz.lock &&\n'> <'\ttest_when_finished "rm -f .git/$prefix/foo/bar/baz.lock" &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <
'\tfatal: cannot lock ref $Q$prefix/foo$Q: there is a non-empty directory $Q.git/$prefix/foo$Q blocking reference $Q$prefix/foo$Q\n'
            > <'\tEOF\n'> <'\tprintf "%s\\n" "update $prefix/foo $C" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <
'\tfatal: cannot lock ref $Q$prefix/foo$Q: unable to resolve reference $Q$prefix/foo$Q\n'
            > <'\tEOF\n'> <'\tprintf "%s\\n" "update $prefix/foo $D $C" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'broken reference blocks create'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/broken-create &&\n'> <'\tmkdir -p .git/$prefix &&\n'> 
            <'\techo "gobbledigook" >.git/$prefix/foo &&\n'> <'\ttest_when_finished "rm -f .git/$prefix/foo" &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <
'\tfatal: cannot lock ref $Q$prefix/foo$Q: unable to resolve reference $Q$prefix/foo$Q: reference broken\n'
            > <'\tEOF\n'> <'\tprintf "%s\\n" "update $prefix/foo $C" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <
'\tfatal: cannot lock ref $Q$prefix/foo$Q: unable to resolve reference $Q$prefix/foo$Q: reference broken\n'
            > <'\tEOF\n'> <'\tprintf "%s\\n" "update $prefix/foo $D $C" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'non-empty directory blocks indirect create'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/ne-indirect-create &&\n'> 
            <'\tgit symbolic-ref $prefix/symref $prefix/foo &&\n'> <'\tmkdir -p .git/$prefix/foo/bar &&\n'> <'\t: >.git/$prefix/foo/bar/baz.lock &&\n'> 
            <'\ttest_when_finished "rm -f .git/$prefix/foo/bar/baz.lock" &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <
'\tfatal: cannot lock ref $Q$prefix/symref$Q: there is a non-empty directory $Q.git/$prefix/foo$Q blocking reference $Q$prefix/foo$Q\n'
            > <'\tEOF\n'> <'\tprintf "%s\\n" "update $prefix/symref $C" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <
'\tfatal: cannot lock ref $Q$prefix/symref$Q: unable to resolve reference $Q$prefix/foo$Q\n'
            > <'\tEOF\n'> <'\tprintf "%s\\n" "update $prefix/symref $D $C" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'broken reference blocks indirect create'>)}
        {
          (SQ <'\n'> <'\tprefix=refs/broken-indirect-create &&\n'> 
            <'\tgit symbolic-ref $prefix/symref $prefix/foo &&\n'> <'\techo "gobbledigook" >.git/$prefix/foo &&\n'> 
            <'\ttest_when_finished "rm -f .git/$prefix/foo" &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <
'\tfatal: cannot lock ref $Q$prefix/symref$Q: unable to resolve reference $Q$prefix/foo$Q: reference broken\n'
            > <'\tEOF\n'> <'\tprintf "%s\\n" "update $prefix/symref $C" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err &&\n'> <'\tcat >expected <<-EOF &&\n'> 
            <
'\tfatal: cannot lock ref $Q$prefix/symref$Q: unable to resolve reference $Q$prefix/foo$Q: reference broken\n'
            > <'\tEOF\n'> <'\tprintf "%s\\n" "update $prefix/symref $D $C" |\n'> 
            <'\ttest_must_fail git update-ref --stdin 2>output.err &&\n'> <'\ttest_cmp expected output.err\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)