(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 <'git init'>)}
        )
      ]
      redirects: []
    )
    (command.Simple
      blame_tok: <.>
      more_env: []
      words: [{<.>} {<'./test-lib.sh'>}]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <check_config>
      name: check_config
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          children: [
                            (command.Simple
                              blame_tok: <test>
                              more_env: []
                              words: [{<test>} {<-d>} {(DQ ($ Id.VSub_Number 1))}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <test>
                              more_env: []
                              words: [{<test>} {<-f>} {(DQ ($ Id.VSub_Number 1) <'/config'>)}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <test>
                              more_env: []
                              words: [{<test>} {<-d>} {(DQ ($ Id.VSub_Number 1) <'/refs'>)}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_DAmp _> <Id.Op_DAmp _>]
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <Id.Lit_Colon ':'>
                      more_env: []
                      words: [{<Id.Lit_Colon ':'>} {<happy>}]
                      redirects: []
                      do_fork: T
                    )
                  ]
                  spids: [23 56]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.Simple
                  blame_tok: <echo>
                  more_env: []
                  words: [
                    {<echo>}
                    {
                      (DQ <'expected a directory '> ($ Id.VSub_Number 1) <', a file '> 
                        ($ Id.VSub_Number 1) <'/config and '> ($ Id.VSub_Number 1) <'/refs'>
                      )
                    }
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.ControlFlow
                  keyword: <Id.ControlFlow_Return return>
                  arg_word: {<1>}
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.AndOr
                          children: [
                            (command.Simple
                              blame_tok: <test_have_prereq>
                              more_env: []
                              words: [{<test_have_prereq>} {<POSIXPERM>}]
                              redirects: []
                              do_fork: T
                            )
                            (command.Simple
                              blame_tok: <test>
                              more_env: []
                              words: [{<test>} {<-x>} {(DQ ($ Id.VSub_Number 1) <'/config'>)}]
                              redirects: []
                              do_fork: T
                            )
                          ]
                          ops: [<Id.Op_DAmp _>]
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [{<echo>} {(DQ ($ Id.VSub_Number 1) <'/config is executable?'>)}]
                      redirects: []
                      do_fork: T
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  spids: [89 107]
                )
              ]
              else_action: []
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
            (command.ShAssignment
              left: <Id.Lit_VarLike 'bare='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'bare='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'bare='> name:bare)
                  op: assign_op.Equal
                  rhs: 
                    {
                      (CommandSub
                        left_token: <Id.Left_DollarParen '$('>
                        child: 
                          (command.AndOr
                            children: [
                              (command.Simple
                                blame_tok: <cd>
                                more_env: []
                                words: [{<cd>} {(DQ ($ Id.VSub_Number 1))}]
                                redirects: []
                                do_fork: T
                              )
                              (command.Simple
                                blame_tok: <git>
                                more_env: []
                                words: [{<git>} {<config>} {<--bool>} {<core.bare>}]
                                redirects: []
                                do_fork: T
                              )
                            ]
                            ops: [<Id.Op_DAmp _>]
                          )
                        right: <Id.Eof_RParen _>
                      )
                    }
                )
              ]
              redirects: []
            )
            (command.AndOr
              children: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'worktree='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'worktree='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'worktree='> name:worktree)
                      op: assign_op.Equal
                      rhs: 
                        {
                          (CommandSub
                            left_token: <Id.Left_DollarParen '$('>
                            child: 
                              (command.AndOr
                                children: [
                                  (command.Simple
                                    blame_tok: <cd>
                                    more_env: []
                                    words: [{<cd>} {(DQ ($ Id.VSub_Number 1))}]
                                    redirects: []
                                    do_fork: T
                                  )
                                  (command.Simple
                                    blame_tok: <git>
                                    more_env: []
                                    words: [{<git>} {<config>} {<core.worktree>}]
                                    redirects: []
                                    do_fork: T
                                  )
                                ]
                                ops: [<Id.Op_DAmp _>]
                              )
                            right: <Id.Eof_RParen _>
                          )
                        }
                    )
                  ]
                  redirects: []
                )
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'worktree='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'worktree='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'worktree='> name:worktree)
                      op: assign_op.Equal
                      rhs: {<unset>}
                    )
                  ]
                  redirects: []
                )
              ]
              ops: [<Id.Op_DPipe _>]
            )
            (command.AndOr
              children: [
                (command.Simple
                  blame_tok: <test>
                  more_env: []
                  words: [
                    {<test>}
                    {(DQ ($ Id.VSub_DollarName bare))}
                    {<Id.Lit_Equals '='>}
                    {(DQ ($ Id.VSub_Number 2))}
                  ]
                  redirects: []
                  do_fork: T
                )
                (command.Simple
                  blame_tok: <test>
                  more_env: []
                  words: [
                    {<test>}
                    {(DQ ($ Id.VSub_DollarName worktree))}
                    {<Id.Lit_Equals '='>}
                    {(DQ ($ Id.VSub_Number 3))}
                  ]
                  redirects: []
                  do_fork: T
                )
                (BraceGroup
                  left: <Id.Lit_LBrace '{'>
                  children: [
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [
                        {<echo>}
                        {
                          (DQ <'expected bare='> ($ Id.VSub_Number 2) <' worktree='> 
                            ($ Id.VSub_Number 3)
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.Simple
                      blame_tok: <echo>
                      more_env: []
                      words: [
                        {<echo>}
                        {
                          (DQ <'     got bare='> ($ Id.VSub_DollarName bare) <' worktree='> 
                            ($ Id.VSub_DollarName worktree)
                          )
                        }
                      ]
                      redirects: []
                      do_fork: T
                    )
                    (command.ControlFlow
                      keyword: <Id.ControlFlow_Return return>
                      arg_word: {<1>}
                    )
                  ]
                  redirects: []
                  right: <Id.Lit_RBrace '}'>
                )
              ]
              ops: [<Id.Op_DAmp _> <Id.Op_DPipe _>]
            )
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <plain>)}
        {(SQ <'\n'> <'\tgit init plain &&\n'> <'\tcheck_config plain/.git false unset\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'plain nested in bare'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tgit init --bare bare-ancestor.git &&\n'> 
            <'\t\tcd bare-ancestor.git &&\n'> <'\t\tmkdir plain-nested &&\n'> <'\t\tcd plain-nested &&\n'> <'\t\tgit init\n'> <'\t) &&\n'> 
            <'\tcheck_config bare-ancestor.git/plain-nested/.git false unset\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'plain through aliased command, outside any git repo'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tHOME=$(pwd)/alias-config &&\n'> <'\t\texport HOME &&\n'> 
            <'\t\tmkdir alias-config &&\n'> <'\t\techo "[alias] aliasedinit = init" >alias-config/.gitconfig &&\n'> <'\n'> 
            <'\t\tGIT_CEILING_DIRECTORIES=$(pwd) &&\n'> <'\t\texport GIT_CEILING_DIRECTORIES &&\n'> <'\n'> <'\t\tmkdir plain-aliased &&\n'> 
            <'\t\tcd plain-aliased &&\n'> <'\t\tgit aliasedinit\n'> <'\t) &&\n'> <'\tcheck_config plain-aliased/.git false unset\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'plain nested through aliased command'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tgit init plain-ancestor-aliased &&\n'> 
            <'\t\tcd plain-ancestor-aliased &&\n'> <'\t\techo "[alias] aliasedinit = init" >>.git/config &&\n'> <'\t\tmkdir plain-nested &&\n'> 
            <'\t\tcd plain-nested &&\n'> <'\t\tgit aliasedinit\n'> <'\t) &&\n'> 
            <'\tcheck_config plain-ancestor-aliased/plain-nested/.git false unset\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'plain nested in bare through aliased command'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\t\tgit init --bare bare-ancestor-aliased.git &&\n'> 
            <'\t\tcd bare-ancestor-aliased.git &&\n'> <'\t\techo "[alias] aliasedinit = init" >>config &&\n'> <'\t\tmkdir plain-nested &&\n'> 
            <'\t\tcd plain-nested &&\n'> <'\t\tgit aliasedinit\n'> <'\t) &&\n'> 
            <'\tcheck_config bare-ancestor-aliased.git/plain-nested/.git false unset\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'No extra GIT_* on alias scripts'>)}
        {
          (SQ <'\n'> <'\twrite_script script <<-\\EOF &&\n'> <'\tenv |\n'> <'\t\tsed -n \\\n'> 
            <'\t\t\t-e "/^GIT_PREFIX=/d" \\\n'> <'\t\t\t-e "/^GIT_TEXTDOMAINDIR=/d" \\\n'> <'\t\t\t-e "/^GIT_/s/=.*//p" |\n'> <'\t\tsort\n'> <'\tEOF\n'> 
            <'\t./script >expected &&\n'> <'\tgit config alias.script \\!./script &&\n'> 
            <'\t( mkdir sub && cd sub && git script >../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 <'plain with GIT_WORK_TREE'>)}
        {
          (SQ <'\n'> <'\tmkdir plain-wt &&\n'> 
            <'\ttest_must_fail env GIT_WORK_TREE="$(pwd)/plain-wt" git init plain-wt\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'plain bare'>)}
        {
          (SQ <'\n'> <'\tgit --bare init plain-bare-1 &&\n'> 
            <'\tcheck_config plain-bare-1 true unset\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'plain bare with GIT_WORK_TREE'>)}
        {
          (SQ <'\n'> <'\tmkdir plain-bare-2 &&\n'> <'\ttest_must_fail \\\n'> 
            <'\t\tenv GIT_WORK_TREE="$(pwd)/plain-bare-2" \\\n'> <'\t\tgit --bare init plain-bare-2\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'GIT_DIR bare'>)}
        {
          (SQ <'\n'> <'\tmkdir git-dir-bare.git &&\n'> <'\tGIT_DIR=git-dir-bare.git git init &&\n'> 
            <'\tcheck_config git-dir-bare.git true unset\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init --bare'>)}
        {
          (SQ <'\n'> <'\tgit init --bare init-bare.git &&\n'> 
            <'\tcheck_config init-bare.git true unset\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'GIT_DIR non-bare'>)}
        {
          (SQ <'\n'> <'\n'> <'\t(\n'> <'\t\tmkdir non-bare &&\n'> <'\t\tcd non-bare &&\n'> 
            <'\t\tGIT_DIR=.git git init\n'> <'\t) &&\n'> <'\tcheck_config non-bare/.git false unset\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'GIT_DIR & GIT_WORK_TREE (1)'>)}
        {
          (SQ <'\n'> <'\n'> <'\t(\n'> <'\t\tmkdir git-dir-wt-1.git &&\n'> 
            <'\t\tGIT_WORK_TREE=$(pwd) GIT_DIR=git-dir-wt-1.git git init\n'> <'\t) &&\n'> <'\tcheck_config git-dir-wt-1.git false "$(pwd)"\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'GIT_DIR & GIT_WORK_TREE (2)'>)}
        {
          (SQ <'\n'> <'\tmkdir git-dir-wt-2.git &&\n'> <'\ttest_must_fail env \\\n'> 
            <'\t\tGIT_WORK_TREE="$(pwd)" \\\n'> <'\t\tGIT_DIR=git-dir-wt-2.git \\\n'> <'\t\tgit --bare init\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <reinit>)}
        {
          (SQ <'\n'> <'\n'> <'\t(\n'> <'\t\tmkdir again &&\n'> <'\t\tcd again &&\n'> 
            <'\t\tgit init >out1 2>err1 &&\n'> <'\t\tgit init >out2 2>err2\n'> <'\t) &&\n'> <'\ttest_i18ngrep "Initialized empty" again/out1 &&\n'> 
            <'\ttest_i18ngrep "Reinitialized existing" again/out2 &&\n'> <'\t>again/empty &&\n'> <'\ttest_i18ncmp again/empty again/err1 &&\n'> 
            <'\ttest_i18ncmp again/empty again/err2\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init with --template'>)}
        {
          (SQ <'\n'> <'\tmkdir template-source &&\n'> <'\techo content >template-source/file &&\n'> 
            <'\tgit init --template=../template-source template-custom &&\n'> <'\ttest_cmp template-source/file template-custom/.git/file\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init with --template (blank)'>)}
        {
          (SQ <'\n'> <'\tgit init template-plain &&\n'> 
            <'\ttest_path_is_file template-plain/.git/info/exclude &&\n'> <'\tgit init --template= template-blank &&\n'> 
            <'\ttest_path_is_missing template-blank/.git/info/exclude\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init with init.templatedir set'>)}
        {
          (SQ <'\n'> <'\tmkdir templatedir-source &&\n'> 
            <'\techo Content >templatedir-source/file &&\n'> <'\ttest_config_global init.templatedir "${HOME}/templatedir-source" &&\n'> <'\t(\n'> 
            <'\t\tmkdir templatedir-set &&\n'> <'\t\tcd templatedir-set &&\n'> <'\t\tsane_unset GIT_TEMPLATE_DIR &&\n'> 
            <'\t\tNO_SET_GIT_TEMPLATE_DIR=t &&\n'> <'\t\texport NO_SET_GIT_TEMPLATE_DIR &&\n'> <'\t\tgit init\n'> <'\t) &&\n'> 
            <'\ttest_cmp templatedir-source/file templatedir-set/.git/file\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init --bare/--shared overrides system/global config'>)}
        {
          (SQ <'\n'> <'\ttest_config_global core.bare false &&\n'> 
            <'\ttest_config_global core.sharedRepository 0640 &&\n'> <'\tgit init --bare --shared=0666 init-bare-shared-override &&\n'> 
            <'\tcheck_config init-bare-shared-override true unset &&\n'> <'\ttest x0666 = \\\n'> 
            <'\tx$(git config -f init-bare-shared-override/config core.sharedRepository)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init honors global core.sharedRepository'>)}
        {
          (SQ <'\n'> <'\ttest_config_global core.sharedRepository 0666 &&\n'> 
            <'\tgit init shared-honor-global &&\n'> <'\ttest x0666 = \\\n'> 
            <'\tx$(git config -f shared-honor-global/.git/config core.sharedRepository)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init allows insanely long --template'>)}
        {(SQ <'\n'> <'\tgit init --template=$(printf "x%09999dx" 1) test\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init creates a new directory'>)}
        {
          (SQ <'\n'> <'\trm -fr newdir &&\n'> <'\tgit init newdir &&\n'> 
            <'\ttest_path_is_dir newdir/.git/refs\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init creates a new bare directory'>)}
        {
          (SQ <'\n'> <'\trm -fr newdir &&\n'> <'\tgit init --bare newdir &&\n'> 
            <'\ttest_path_is_dir newdir/refs\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init recreates a directory'>)}
        {
          (SQ <'\n'> <'\trm -fr newdir &&\n'> <'\tmkdir newdir &&\n'> <'\tgit init newdir &&\n'> 
            <'\ttest_path_is_dir newdir/.git/refs\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init recreates a new bare directory'>)}
        {
          (SQ <'\n'> <'\trm -fr newdir &&\n'> <'\tmkdir newdir &&\n'> <'\tgit init --bare newdir &&\n'> 
            <'\ttest_path_is_dir newdir/refs\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init creates a new deep directory'>)}
        {
          (SQ <'\n'> <'\trm -fr newdir &&\n'> <'\tgit init newdir/a/b/c &&\n'> 
            <'\ttest_path_is_dir newdir/a/b/c/.git/refs\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<POSIXPERM>}
        {(SQ <'init creates a new deep directory (umask vs. shared)'>)}
        {
          (SQ <'\n'> <'\trm -fr newdir &&\n'> <'\t(\n'> 
            <'\t\t# Leading directories should honor umask while\n'> <'\t\t# the repository itself should follow "shared"\n'> <'\t\tumask 002 &&\n'> 
            <'\t\tgit init --bare --shared=0660 newdir/a/b/c &&\n'> <'\t\ttest_path_is_dir newdir/a/b/c/refs &&\n'> <'\t\tls -ld newdir/a newdir/a/b > lsab.out &&\n'> 
            <'\t\t! grep -v "^drwxrw[sx]r-x" lsab.out &&\n'> <'\t\tls -ld newdir/a/b/c > lsc.out &&\n'> <'\t\t! grep -v "^drwxrw[sx]---" lsc.out\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init notices EEXIST (1)'>)}
        {
          (SQ <'\n'> <'\trm -fr newdir &&\n'> <'\t>newdir &&\n'> 
            <'\ttest_must_fail git init newdir &&\n'> <'\ttest_path_is_file newdir\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init notices EEXIST (2)'>)}
        {
          (SQ <'\n'> <'\trm -fr newdir &&\n'> <'\tmkdir newdir &&\n'> <'\t>newdir/a &&\n'> 
            <'\ttest_must_fail git init newdir/a/b &&\n'> <'\ttest_path_is_file newdir/a\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<POSIXPERM> <Id.Lit_Comma ','> <SANITY>}
        {(SQ <'init notices EPERM'>)}
        {
          (SQ <'\n'> <'\trm -fr newdir &&\n'> <'\tmkdir newdir &&\n'> <'\tchmod -w newdir &&\n'> 
            <'\ttest_must_fail git init newdir/a/b\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init creates a new bare directory with global --bare'>)}
        {
          (SQ <'\n'> <'\trm -rf newdir &&\n'> <'\tgit --bare init newdir &&\n'> 
            <'\ttest_path_is_dir newdir/refs\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init prefers command line to GIT_DIR'>)}
        {
          (SQ <'\n'> <'\trm -rf newdir &&\n'> <'\tmkdir otherdir &&\n'> 
            <'\tGIT_DIR=otherdir git --bare init newdir &&\n'> <'\ttest_path_is_dir newdir/refs &&\n'> <'\ttest_path_is_missing otherdir/refs\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'init with separate gitdir'>)}
        {
          (SQ <'\n'> <'\trm -rf newdir &&\n'> <'\tgit init --separate-git-dir realgitdir newdir &&\n'> 
            <'\techo "gitdir: $(pwd)/realgitdir" >expected &&\n'> <'\ttest_cmp expected newdir/.git &&\n'> <'\ttest_path_is_dir realgitdir/refs\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'re-init on .git file'>)}
        {(SQ <'\n'> <'\t( cd newdir && git init )\n'>)}
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'re-init to update git link'>)}
        {
          (SQ <'\n'> <'\t(\n'> <'\tcd newdir &&\n'> <'\tgit init --separate-git-dir ../surrealgitdir\n'> 
            <'\t) &&\n'> <'\techo "gitdir: $(pwd)/surrealgitdir" >expected &&\n'> <'\ttest_cmp expected newdir/.git &&\n'> 
            <'\ttest_path_is_dir surrealgitdir/refs &&\n'> <'\ttest_path_is_missing realgitdir/refs\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'re-init to move gitdir'>)}
        {
          (SQ <'\n'> <'\trm -rf newdir realgitdir surrealgitdir &&\n'> <'\tgit init newdir &&\n'> 
            <'\t(\n'> <'\tcd newdir &&\n'> <'\tgit init --separate-git-dir ../realgitdir\n'> <'\t) &&\n'> 
            <'\techo "gitdir: $(pwd)/realgitdir" >expected &&\n'> <'\ttest_cmp expected newdir/.git &&\n'> <'\ttest_path_is_dir realgitdir/refs\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<SYMLINKS>}
        {(SQ <'re-init to move gitdir symlink'>)}
        {
          (SQ <'\n'> <'\trm -rf newdir realgitdir &&\n'> <'\tgit init newdir &&\n'> <'\t(\n'> 
            <'\tcd newdir &&\n'> <'\tmv .git here &&\n'> <'\tln -s here .git &&\n'> <'\tgit init --separate-git-dir ../realgitdir\n'> 
            <'\t) &&\n'> <'\techo "gitdir: $(pwd)/realgitdir" >expected &&\n'> <'\ttest_cmp expected newdir/.git &&\n'> 
            <'\ttest_cmp expected newdir/here &&\n'> <'\ttest_path_is_dir realgitdir/refs\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.ShFunction
      name_tok: <is_hidden>
      name: is_hidden
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Case
              case_kw: <Id.KW_Case case>
              to_match: 
                (case_arg.Word
                  w: 
                    {
                      (DQ 
                        (CommandSub
                          left_token: <Id.Left_DollarParen '$('>
                          child: 
                            (command.Simple
                              blame_tok: <attrib>
                              more_env: []
                              words: [{<attrib>} {(DQ ($ Id.VSub_Number 1))}]
                              redirects: []
                              do_fork: T
                            )
                          right: <Id.Eof_RParen _>
                        )
                      )
                    }
                )
              arms_start: <Id.KW_In in>
              arms: [
                (CaseArm
                  left: <Id.Lit_Star '*'>
                  pattern: 
                    (pat.Words
                      words: [
                        {<Id.Lit_Star '*'> <H> <Id.Lit_Star '*'> <Id.Lit_QMark '?'> <Id.Lit_Colon ':'> 
                          <Id.Lit_Star '*'>
                        }
                      ]
                    )
                  middle: <Id.Right_CasePat _>
                  action: [(command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<0>})]
                  right: <Id.Op_DSemi _>
                )
              ]
              arms_end: <Id.KW_Esac esac>
              redirects: []
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Return return> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<MINGW>}
        {(SQ <'.git hidden'>)}
        {
          (SQ <'\n'> <'\trm -rf newdir &&\n'> <'\t(\n'> <'\t\tunset GIT_DIR GIT_WORK_TREE\n'> 
            <'\t\tmkdir newdir &&\n'> <'\t\tcd newdir &&\n'> <'\t\tgit init &&\n'> <'\t\tis_hidden .git\n'> <'\t) &&\n'> 
            <'\tcheck_config newdir/.git false unset\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {<MINGW>}
        {(SQ <'bare git dir not hidden'>)}
        {
          (SQ <'\n'> <'\trm -rf newdir &&\n'> <'\t(\n'> <'\t\tunset GIT_DIR GIT_WORK_TREE GIT_CONFIG\n'> 
            <'\t\tmkdir newdir &&\n'> <'\t\tcd newdir &&\n'> <'\t\tgit --bare init\n'> <'\t) &&\n'> <'\t! is_hidden newdir\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_expect_success>
      more_env: []
      words: [
        {<test_expect_success>}
        {(SQ <'remote init from does not use config from cwd'>)}
        {
          (SQ <'\n'> <'\trm -rf newdir &&\n'> <'\ttest_config core.logallrefupdates true &&\n'> 
            <'\tgit init newdir &&\n'> <'\techo true >expect &&\n'> <'\tgit -C newdir config --bool core.logallrefupdates >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 <'re-init from a linked worktree'>)}
        {
          (SQ <'\n'> <'\tgit init main-worktree &&\n'> <'\t(\n'> <'\t\tcd main-worktree &&\n'> 
            <'\t\ttest_commit first &&\n'> <'\t\tgit worktree add ../linked-worktree &&\n'> <'\t\tmv .git/info/exclude expected-exclude &&\n'> 
            <'\t\tcp .git/config expected-config &&\n'> <'\t\tfind .git/worktrees -print | sort >expected &&\n'> <'\t\tgit -C ../linked-worktree init &&\n'> 
            <'\t\ttest_cmp expected-exclude .git/info/exclude &&\n'> <'\t\ttest_cmp expected-config .git/config &&\n'> 
            <'\t\tfind .git/worktrees -print | sort >actual &&\n'> <'\t\ttest_cmp expected actual\n'> <'\t)\n'>
          )
        }
      ]
      redirects: []
      do_fork: T
    )
    (command.Simple
      blame_tok: <test_done>
      more_env: []
      words: [{<test_done>}]
      redirects: []
      do_fork: T
    )
  ]
)