(command.CommandList
  children: [
    (C {(.)} {(git-sh-i18n)})
    (C {(unset)} {(CDPATH)})
    (command.Assignment
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:IFS) op:Equal rhs:{(SQ <' \t\n'>)})]
    )
    (command.FuncDef
      name: git_broken_path_fix
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(DQ (':') ($ VSub_DollarName '$PATH') (':'))}
              arms: [
                (case_arm
                  pat_list: [
                    {(Lit_Star '*') (Lit_Other ':') ($ VSub_Number '$1') (Lit_Other ':') (Lit_Star '*')}
                  ]
                  action: [(C {(Lit_Other ':')} {(ok)})]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*')}]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:PATH)
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.Assignment
                                        pairs: [
                                          (assign_pair
                                            lhs: (lhs_expr.LhsName name:SANE_TOOL_PATH)
                                            op: Equal
                                            rhs: {(DQ ($ VSub_Number '$1'))}
                                          )
                                        ]
                                      )
                                      (command.Assignment
                                        pairs: [
                                          (assign_pair
                                            lhs: (lhs_expr.LhsName name:IFS)
                                            op: Equal
                                            rhs: {(Lit_Other ':')}
                                          )
                                          (assign_pair
                                            lhs: (lhs_expr.LhsName name:path)
                                            op: Equal
                                            rhs: (word.Empty)
                                          )
                                          (assign_pair
                                            lhs: (lhs_expr.LhsName name:sep)
                                            op: Equal
                                            rhs: (word.Empty)
                                          )
                                        ]
                                      )
                                      (C {(set)} {(x)} {($ VSub_DollarName '$PATH')})
                                      (C {(shift)})
                                      (command.ForEach
                                        iter_name: elem
                                        do_arg_iter: T
                                        body: 
                                          (command.DoGroup
                                            children: [
                                              (command.Case
                                                to_match: 
                                                  {
                                                    (DQ ($ VSub_DollarName '$SANE_TOOL_PATH') (':') 
                                                      ($ VSub_DollarName '$elem')
                                                    )
                                                  }
                                                arms: [
                                                  (case_arm
                                                    pat_list: [
                                                      {(Lit_QMark '?') (Lit_Star '*') (Lit_Other ':') 
                                                        (/bin)
                                                      }
                                                      {(Lit_QMark '?') (Lit_Star '*') (Lit_Other ':') 
                                                        (/usr/bin)
                                                      }
                                                    ]
                                                    action: [
                                                      (command.Assignment
                                                        pairs: [
                                                          (assign_pair
                                                            lhs: (lhs_expr.LhsName name:path)
                                                            op: Equal
                                                            rhs: 
                                                              {
                                                                (DQ ($ VSub_DollarName '$path') 
                                                                  ($ VSub_DollarName '$sep') ($ VSub_DollarName '$SANE_TOOL_PATH')
                                                                )
                                                              }
                                                          )
                                                        ]
                                                      )
                                                      (command.Assignment
                                                        pairs: [
                                                          (assign_pair
                                                            lhs: (lhs_expr.LhsName name:sep)
                                                            op: Equal
                                                            rhs: {(Lit_Other ':')}
                                                          )
                                                        ]
                                                      )
                                                      (command.Assignment
                                                        pairs: [
                                                          (assign_pair
                                                            lhs: 
                                                              (lhs_expr.LhsName
                                                                name: SANE_TOOL_PATH
                                                              )
                                                            op: Equal
                                                            rhs: (word.Empty)
                                                          )
                                                        ]
                                                      )
                                                    ]
                                                  )
                                                ]
                                              )
                                              (command.Assignment
                                                pairs: [
                                                  (assign_pair
                                                    lhs: (lhs_expr.LhsName name:path)
                                                    op: Equal
                                                    rhs: 
                                                      {
                                                        (DQ ($ VSub_DollarName '$path') 
                                                          ($ VSub_DollarName '$sep') ($ VSub_DollarName '$elem')
                                                        )
                                                      }
                                                  )
                                                ]
                                              )
                                              (command.Assignment
                                                pairs: [
                                                  (assign_pair
                                                    lhs: (lhs_expr.LhsName name:sep)
                                                    op: Equal
                                                    rhs: {(Lit_Other ':')}
                                                  )
                                                ]
                                              )
                                            ]
                                          )
                                      )
                                      (C {(echo)} {(DQ ($ VSub_DollarName '$path'))})
                                    ]
                                  )
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: die
      body: (command.BraceGroup children:[(C {(die_with_status)} {(1)} {(DQ ($ VSub_At '$@'))})])
    )
    (command.FuncDef
      name: die_with_status
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:status)
                  op: Equal
                  rhs: {($ VSub_Number '$1')}
                )
              ]
            )
            (C {(shift)})
            (command.Simple
              words: [{(printf)} {(SQ <'%s\\n'>)} {(DQ ($ VSub_Star '$*'))}]
              redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
            (command.ControlFlow
              token: <ControlFlow_Exit exit>
              arg_word: {(DQ ($ VSub_DollarName '$status'))}
            )
          ]
        )
    )
    (command.Assignment
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:GIT_QUIET) op:Equal rhs:(word.Empty))]
    )
    (command.FuncDef
      name: say
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$GIT_QUIET'))})]
                  action: [(C {(printf)} {(SQ <'%s\\n'>)} {(DQ ($ VSub_Star '$*'))})]
                )
              ]
            )
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$OPTIONS_SPEC'))})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.FuncDef
              name: usage
              body: 
                (command.BraceGroup
                  children: [
                    (C {(DQ ($ VSub_Number '$0'))} {(-h)})
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
            )
            (command.Assignment
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:parseopt_extra) op:Equal rhs:(word.Empty))]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_LBracket '[')} {(-n)} {(DQ ($ VSub_DollarName '$OPTIONS_KEEPDASHDASH'))} 
                  {(Lit_RBracket ']')}
                )
                (command.Assignment
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:parseopt_extra)
                      op: Equal
                      rhs: {(DQ (--keep-dashdash))}
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp]
              children: [
                (C {(Lit_LBracket '[')} {(-n)} {(DQ ($ VSub_DollarName '$OPTIONS_STUCKLONG'))} 
                  {(Lit_RBracket ']')}
                )
                (command.Assignment
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:parseopt_extra)
                      op: Equal
                      rhs: {(DQ ($ VSub_DollarName '$parseopt_extra') (' --stuck-long'))}
                    )
                  ]
                )
              ]
            )
            (C {(eval)} 
              {
                (DQ 
                  (word_part.CommandSub
                    left_token: <Left_DollarParen '$('>
                    command_list: 
                      (command.CommandList
                        children: [
                          (command.AndOr
                            ops: [Op_DPipe]
                            children: [
                              (command.Pipeline
                                children: [
                                  (C {(echo)} {(DQ ($ VSub_DollarName '$OPTIONS_SPEC'))})
                                  (C {(git)} {(rev-parse)} {(--parseopt)} 
                                    {($ VSub_DollarName '$parseopt_extra')} {(--)} {(DQ ($ VSub_At '$@'))}
                                  )
                                ]
                                negated: F
                              )
                              (C {(echo)} {(ControlFlow_Exit exit)} {($ VSub_QMark '$?')})
                            ]
                          )
                        ]
                      )
                  )
                )
              }
            )
          ]
        )
      ]
      else_action: [
        (command.Assignment
          pairs: [
            (assign_pair
              lhs: (lhs_expr.LhsName name:dashless)
              op: Equal
              rhs: 
                {
                  (word_part.CommandSub
                    left_token: <Left_DollarParen '$('>
                    command_list: 
                      (command.CommandList
                        children: [
                          (command.Pipeline
                            children: [
                              (C {(basename)} {(--)} {(DQ ($ VSub_Number '$0'))})
                              (C {(sed)} {(-e)} {(SQ <'s/-/ /'>)})
                            ]
                            negated: F
                          )
                        ]
                      )
                  )
                }
            )
          ]
        )
        (command.FuncDef
          name: usage
          body: 
            (command.BraceGroup
              children: [
                (C {(die)} 
                  {
                    (DQ 
                      (word_part.CommandSub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(eval_gettext)} 
                                {
                                  (DQ ('usage: ') 
                                    (word_part.EscapedLiteral
                                      token: <Lit_EscapedChar '\\$'>
                                    ) ('dashless ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) (USAGE)
                                  )
                                }
                              )
                            ]
                          )
                      )
                    )
                  }
                )
              ]
            )
        )
        (command.If
          arms: [
            (if_arm
              cond: [
                (C {(Lit_LBracket '[')} {(-z)} {(DQ ($ VSub_DollarName '$LONG_USAGE'))} 
                  {(Lit_RBracket ']')}
                )
              ]
              action: [
                (command.Assignment
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:LONG_USAGE)
                      op: Equal
                      rhs: 
                        {
                          (DQ 
                            (word_part.CommandSub
                              left_token: <Left_DollarParen '$('>
                              command_list: 
                                (command.CommandList
                                  children: [
                                    (C {(eval_gettext)} 
                                      {
                                        (DQ ('usage: ') 
                                          (word_part.EscapedLiteral
                                            token: <Lit_EscapedChar '\\$'>
                                          ) ('dashless ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) (USAGE)
                                        )
                                      }
                                    )
                                  ]
                                )
                            )
                          )
                        }
                    )
                  ]
                )
              ]
            )
          ]
          else_action: [
            (command.Assignment
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:LONG_USAGE)
                  op: Equal
                  rhs: 
                    {
                      (DQ 
                        (word_part.CommandSub
                          left_token: <Left_DollarParen '$('>
                          command_list: 
                            (command.CommandList
                              children: [
                                (C {(eval_gettext)} 
                                  {
                                    (DQ ('usage: ') 
                                      (word_part.EscapedLiteral
                                        token: <Lit_EscapedChar '\\$'>
                                      ) ('dashless ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\$'>) ('USAGE\n') ('\n') 
                                      ($ VSub_DollarName '$LONG_USAGE')
                                    )
                                  }
                                )
                              ]
                            )
                        )
                      )
                    }
                )
              ]
            )
          ]
        )
        (command.Case
          to_match: {(DQ ($ VSub_Number '$1'))}
          arms: [
            (case_arm
              pat_list: [{(-h)}]
              action: [
                (C {(echo)} {(DQ ($ VSub_DollarName '$LONG_USAGE'))})
                (command.ControlFlow token:<ControlFlow_Exit exit>)
              ]
            )
          ]
        )
      ]
    )
    (command.FuncDef
      name: set_reflog_action
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(Lit_LBracket '[')} {(-z)} 
                      {
                        (DQ 
                          (word_part.BracedVarSub
                            token: <VSub_Name GIT_REFLOG_ACTION>
                            suffix_op: (suffix_op.Unary op_id:VTest_ColonPlus arg_word:{(set)})
                          )
                        )
                      } {(Lit_RBracket ']')}
                    )
                  ]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:GIT_REFLOG_ACTION)
                          op: Equal
                          rhs: {(DQ ($ VSub_Star '$*'))}
                        )
                      ]
                    )
                    (C {(export)} {(GIT_REFLOG_ACTION)})
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: git_editor
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(test)} {(-z)} 
                      {
                        (DQ 
                          (word_part.BracedVarSub
                            token: <VSub_Name GIT_EDITOR>
                            suffix_op: (suffix_op.Unary op_id:VTest_ColonPlus arg_word:{(set)})
                          )
                        )
                      }
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (command.Assignment
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:GIT_EDITOR)
                              op: Equal
                              rhs: 
                                {
                                  (DQ 
                                    (word_part.CommandSub
                                      left_token: <Left_DollarParen '$('>
                                      command_list: 
                                        (command.CommandList
                                          children: [(C {(git)} {(KW_Var var)} {(GIT_EDITOR)})]
                                        )
                                    )
                                  )
                                }
                            )
                          ]
                        )
                        (command.ControlFlow
                          token: <ControlFlow_Return return>
                          arg_word: {($ VSub_QMark '$?')}
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (C {(eval)} {(DQ ($ VSub_DollarName '$GIT_EDITOR'))} {(SQ <'"$@"'>)})
          ]
        )
    )
    (command.FuncDef
      name: git_pager
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {(-t)} {(1)})]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:GIT_PAGER)
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(git)} {(KW_Var var)} {(GIT_PAGER)})]
                                  )
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
              ]
              else_action: [
                (command.Assignment
                  pairs: [(assign_pair lhs:(lhs_expr.LhsName name:GIT_PAGER) op:Equal rhs:{(cat)})]
                )
              ]
            )
            (command.ForEach
              iter_name: vardef
              iter_words: [{(Lit_Other '@') (Lit_Splice '@PAGER_ENV') (Lit_Other '@') (Lit_Other '@')}]
              do_arg_iter: F
              body: 
                (command.DoGroup
                  children: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:var)
                          op: Equal
                          rhs: 
                            {
                              (word_part.BracedVarSub
                                token: <VSub_Name vardef>
                                suffix_op: (suffix_op.Unary op_id:VOp1_DPercent arg_word:{('=*')})
                              )
                            }
                        )
                      ]
                    )
                    (C {(eval)} 
                      {
                        (DQ (': ') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) 
                          (word_part.EscapedLiteral
                            token: <Lit_EscapedChar '\\$'>
                          ) ('{') ($ VSub_DollarName '$vardef') ('}') (word_part.EscapedLiteral token:<Lit_EscapedChar '\\"'>) 
                          (' && export ') ($ VSub_DollarName '$var')
                        )
                      }
                    )
                  ]
                )
            )
            (C {(eval)} {(DQ ($ VSub_DollarName '$GIT_PAGER'))} {(SQ <'"$@"'>)})
          ]
        )
    )
    (command.FuncDef
      name: sane_grep
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [
                {(grep)}
                {(Lit_Other '@') (Lit_Splice '@SANE_TEXT_GREP') (Lit_Other '@') (Lit_Other '@')}
                {(DQ ($ VSub_At '$@'))}
              ]
              more_env: [(env_pair name:GREP_OPTIONS val:(word.Empty)) (env_pair name:LC_ALL val:{(C)})]
            )
          ]
        )
    )
    (command.FuncDef
      name: sane_egrep
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [
                {(egrep)}
                {(Lit_Other '@') (Lit_Splice '@SANE_TEXT_GREP') (Lit_Other '@') (Lit_Other '@')}
                {(DQ ($ VSub_At '$@'))}
              ]
              more_env: [(env_pair name:GREP_OPTIONS val:(word.Empty)) (env_pair name:LC_ALL val:{(C)})]
            )
          ]
        )
    )
    (command.FuncDef
      name: is_bare_repository
      body: (command.BraceGroup children:[(C {(git)} {(rev-parse)} {(--is-bare-repository)})])
    )
    (command.FuncDef
      name: cd_to_toplevel
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DAmp Op_DPipe]
              children: [
                (command.Assignment
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:cdup)
                      op: Equal
                      rhs: 
                        {
                          (word_part.CommandSub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [(C {(git)} {(rev-parse)} {(--show-toplevel)})]
                              )
                          )
                        }
                    )
                  ]
                )
                (C {(cd)} {(DQ ($ VSub_DollarName '$cdup'))})
                (command.BraceGroup
                  children: [
                    (command.Simple
                      words: [
                        {(gettextln)}
                        {
                          (DQ ('Cannot chdir to ') 
                            (word_part.EscapedLiteral
                              token: <Lit_EscapedChar '\\$'>
                            ) ('cdup, the toplevel of the working tree')
                          )
                        }
                      ]
                      redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: require_work_tree_exists
      body: 
        (command.BraceGroup
          children: [
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(test)} 
                      {
                        (DQ (z) 
                          (word_part.CommandSub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [(C {(git)} {(rev-parse)} {(--is-bare-repository)})]
                              )
                          )
                        )
                      } {(KW_Bang '!') (Lit_Other '=')} {(zfalse)}
                    )
                  ]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:program_name)
                          op: Equal
                          rhs: {($ VSub_Number '$0')}
                        )
                      ]
                    )
                    (C {(die)} 
                      {
                        (DQ 
                          (word_part.CommandSub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(gettext)} 
                                    {
                                      (DQ ('fatal: ') 
                                        (word_part.EscapedLiteral
                                          token: <Lit_EscapedChar '\\$'>
                                        ) ('program_name cannot be used without a working tree.')
                                      )
                                    }
                                  )
                                ]
                              )
                          )
                        )
                      }
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: require_work_tree
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(test)} 
                  {
                    (DQ 
                      (word_part.CommandSub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Simple
                                words: [{(git)} {(rev-parse)} {(--is-inside-work-tree)}]
                                redirects: [
                                  (redir.Redir
                                    op: <Redir_Great '2>'>
                                    fd: 2
                                    arg_word: {(/dev/null)}
                                  )
                                ]
                              )
                            ]
                          )
                      )
                    )
                  } {(Lit_Other '=')} {(true)}
                )
                (command.BraceGroup
                  children: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:program_name)
                          op: Equal
                          rhs: {($ VSub_Number '$0')}
                        )
                      ]
                    )
                    (C {(die)} 
                      {
                        (DQ 
                          (word_part.CommandSub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(gettext)} 
                                    {
                                      (DQ ('fatal: ') 
                                        (word_part.EscapedLiteral
                                          token: <Lit_EscapedChar '\\$'>
                                        ) ('program_name cannot be used without a working tree.')
                                      )
                                    }
                                  )
                                ]
                              )
                          )
                        )
                      }
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: require_clean_work_tree
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.Simple
                  words: [{(git)} {(rev-parse)} {(--verify)} {(HEAD)}]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})]
                )
                (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
              ]
            )
            (C {(git)} {(update-index)} {(-q)} {(--ignore-submodules)} {(--refresh)})
            (command.Assignment
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:err) op:Equal rhs:{(0)})]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Pipeline
                      children: [(C {(git)} {(diff-files)} {(--quiet)} {(--ignore-submodules)})]
                      negated: T
                    )
                  ]
                  action: [
                    (command.Assignment
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:action)
                          op: Equal
                          rhs: {($ VSub_Number '$1')}
                        )
                      ]
                    )
                    (command.Case
                      to_match: {(DQ ($ VSub_DollarName '$action'))}
                      arms: [
                        (case_arm
                          pat_list: [{(rebase)}]
                          action: [
                            (command.Simple
                              words: [{(gettextln)} {(DQ ('Cannot rebase: You have unstaged changes.'))}]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_GreatAnd '>&'>
                                  fd: 16777215
                                  arg_word: {(2)}
                                )
                              ]
                            )
                          ]
                        )
                        (case_arm
                          pat_list: [{(DQ ('rewrite branches'))}]
                          action: [
                            (command.Simple
                              words: [
                                {(gettextln)}
                                {(DQ ('Cannot rewrite branches: You have unstaged changes.'))}
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_GreatAnd '>&'>
                                  fd: 16777215
                                  arg_word: {(2)}
                                )
                              ]
                            )
                          ]
                        )
                        (case_arm
                          pat_list: [{(DQ ('pull with rebase'))}]
                          action: [
                            (command.Simple
                              words: [
                                {(gettextln)}
                                {(DQ ('Cannot pull with rebase: You have unstaged changes.'))}
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_GreatAnd '>&'>
                                  fd: 16777215
                                  arg_word: {(2)}
                                )
                              ]
                            )
                          ]
                        )
                        (case_arm
                          pat_list: [{(Lit_Star '*')}]
                          action: [
                            (command.Simple
                              words: [
                                {(eval_gettextln)}
                                {
                                  (DQ ('Cannot ') 
                                    (word_part.EscapedLiteral
                                      token: <Lit_EscapedChar '\\$'>
                                    ) ('action: You have unstaged changes.')
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_GreatAnd '>&'>
                                  fd: 16777215
                                  arg_word: {(2)}
                                )
                              ]
                            )
                          ]
                        )
                      ]
                    )
                    (command.Assignment
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:err) op:Equal rhs:{(1)})]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (command.Pipeline
                      children: [
                        (C {(git)} {(diff-index)} {(--cached)} {(--quiet)} {(--ignore-submodules)} {(HEAD)} 
                          {(--)}
                        )
                      ]
                      negated: T
                    )
                  ]
                  action: [
                    (command.If
                      arms: [
                        (if_arm
                          cond: [(C {(test)} {($ VSub_DollarName '$err')} {(Lit_Other '=')} {(0)})]
                          action: [
                            (command.Assignment
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:action)
                                  op: Equal
                                  rhs: {($ VSub_Number '$1')}
                                )
                              ]
                            )
                            (command.Case
                              to_match: {(DQ ($ VSub_DollarName '$action'))}
                              arms: [
                                (case_arm
                                  pat_list: [{(rebase)}]
                                  action: [
                                    (command.Simple
                                      words: [
                                        {(gettextln)}
                                        {
                                          (DQ 
                                            (
'Cannot rebase: Your index contains uncommitted changes.'
                                            )
                                          )
                                        }
                                      ]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_GreatAnd '>&'>
                                          fd: 16777215
                                          arg_word: {(2)}
                                        )
                                      ]
                                    )
                                  ]
                                )
                                (case_arm
                                  pat_list: [{(DQ ('pull with rebase'))}]
                                  action: [
                                    (command.Simple
                                      words: [
                                        {(gettextln)}
                                        {
                                          (DQ 
                                            (
'Cannot pull with rebase: Your index contains uncommitted changes.'
                                            )
                                          )
                                        }
                                      ]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_GreatAnd '>&'>
                                          fd: 16777215
                                          arg_word: {(2)}
                                        )
                                      ]
                                    )
                                  ]
                                )
                                (case_arm
                                  pat_list: [{(Lit_Star '*')}]
                                  action: [
                                    (command.Simple
                                      words: [
                                        {(eval_gettextln)}
                                        {
                                          (DQ ('Cannot ') 
                                            (word_part.EscapedLiteral
                                              token: <Lit_EscapedChar '\\$'>
                                            ) ('action: Your index contains uncommitted changes.')
                                          )
                                        }
                                      ]
                                      redirects: [
                                        (redir.Redir
                                          op: <Redir_GreatAnd '>&'>
                                          fd: 16777215
                                          arg_word: {(2)}
                                        )
                                      ]
                                    )
                                  ]
                                )
                              ]
                            )
                          ]
                        )
                      ]
                      else_action: [
                        (command.Simple
                          words: [
                            {(gettextln)}
                            {(DQ ('Additionally, your index contains uncommitted changes.'))}
                          ]
                          redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                        )
                      ]
                    )
                    (command.Assignment
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:err) op:Equal rhs:{(1)})]
                    )
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {($ VSub_DollarName '$err')} {(Lit_Other '=')} {(1)})]
                  action: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (C {(test)} {(-n)} {(DQ ($ VSub_Number '$2'))})
                        (command.Simple
                          words: [{(echo)} {(DQ ($ VSub_Number '$2'))}]
                          redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.FuncDef
      name: pick_ident_script
      body: 
        (command.BraceGroup
          children: [
            (command.WhileUntil
              keyword: <KW_While while>
              cond: [(C {(test)} {($ VSub_Pound '$#')} {(-gt)} {(0)})]
              body: 
                (command.DoGroup
                  children: [
                    (command.Sentence
                      child: 
                        (command.Assignment
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:lid)
                              op: Equal
                              rhs: {($ VSub_Number '$1')}
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (C {(shift)})
                    (command.Sentence
                      child: 
                        (command.Assignment
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:uid)
                              op: Equal
                              rhs: {($ VSub_Number '$1')}
                            )
                          ]
                        )
                      terminator: <Op_Semi ';'>
                    )
                    (C {(shift)})
                    (C {(printf)} {(SQ <'%s'>)} 
                      {
                        (DQ ('\n') ('\t\t/^') ($ VSub_DollarName '$lid') (' /{\n') ("\t\t\ts/'/'") 
                          (word_part.EscapedLiteral
                            token: <Lit_EscapedChar '\\\\'>
                          ) (word_part.EscapedLiteral token:<Lit_EscapedChar '\\\\'>) ("''/g\n") ('\t\t\th\n') ('\t\t\ts/^') 
                          ($ VSub_DollarName '$lid') (' ')
                        ) (SQ <'\\([^<]*\\) <[^>]*> .*$/\\1/'>) 
                        (DQ ('\n') ('\t\t\ts/.*/GIT_') (${ VSub_Name uid) ("_NAME='&'/p\n") ('\n') 
                          ('\t\t\tg\n') ('\t\t\ts/^') ($ VSub_DollarName '$lid') (' ')
                        ) (SQ <'[^<]* <\\([^>]*\\)> .*$/\\1/'>) 
                        (DQ ('\n') ('\t\t\ts/.*/GIT_') (${ VSub_Name uid) ("_EMAIL='&'/p\n") ('\n') 
                          ('\t\t\tg\n') ('\t\t\ts/^') ($ VSub_DollarName '$lid') (' ')
                        ) (SQ <'[^<]* <[^>]*> \\(.*\\)$/@\\1/'>) 
                        (DQ ('\n') ('\t\t\ts/.*/GIT_') (${ VSub_Name uid) ("_DATE='&'/p\n") ('\t\t}\n') 
                          ('\t\t')
                        )
                      }
                    )
                  ]
                )
            )
            (C {(echo)} {(SQ <'/^$/q'>)})
          ]
        )
    )
    (command.FuncDef
      name: parse_ident_from_commit
      body: 
        (command.BraceGroup
          children: [
            (command.Simple
              words: [
                {(sed)}
                {(-ne)}
                {
                  (DQ 
                    (word_part.CommandSub
                      left_token: <Left_DollarParen '$('>
                      command_list: 
                        (command.CommandList
                          children: [(C {(pick_ident_script)} {(DQ ($ VSub_At '$@'))})]
                        )
                    )
                  )
                }
              ]
              more_env: [(env_pair name:LANG val:{(C)}) (env_pair name:LC_ALL val:{(C)})]
            )
          ]
        )
    )
    (command.FuncDef
      name: get_author_ident_from_commit
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:encoding)
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.AndOr
                                ops: [Op_DPipe]
                                children: [
                                  (C {(git)} {(config)} {(i18n.commitencoding)})
                                  (C {(echo)} {(UTF-8)})
                                ]
                              )
                            ]
                          )
                      )
                    }
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {(git)} {(show)} {(-s)} {(--pretty) (Lit_Other '=') (raw)} 
                  {(--encoding) (Lit_Other '=') (DQ ($ VSub_DollarName '$encoding'))} {(DQ ($ VSub_Number '$1'))} {(--)}
                )
                (C {(parse_ident_from_commit)} {(author)} {(AUTHOR)})
              ]
              negated: F
            )
          ]
        )
    )
    (command.FuncDef
      name: clear_local_git_env
      body: 
        (command.BraceGroup
          children: [
            (C {(unset)} 
              {
                (word_part.CommandSub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [(C {(git)} {(rev-parse)} {(--local-env-vars)})]
                    )
                )
              }
            )
          ]
        )
    )
    (command.FuncDef
      name: create_virtual_base
      body: 
        (command.BraceGroup
          children: [
            (command.Assignment
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:sz0)
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Simple
                                words: [{(wc)} {(-c)}]
                                redirects: [
                                  (redir.Redir
                                    op: <Redir_Less '<'>
                                    fd: 16777215
                                    arg_word: {(DQ ($ VSub_Number '$1'))}
                                  )
                                ]
                              )
                            ]
                          )
                      )
                    }
                )
              ]
            )
            (command.Pipeline
              children: [
                (C {(Lit_Other '@') (Lit_Splice '@DIFF') (Lit_Other '@') (Lit_Other '@')} {(-u)} 
                  {(-La/) (DQ ($ VSub_Number '$1'))} {(-Lb/) (DQ ($ VSub_Number '$1'))} {(DQ ($ VSub_Number '$1'))} {(DQ ($ VSub_Number '$2'))}
                )
                (C {(git)} {(apply)} {(--no-add)})
              ]
              negated: F
            )
            (command.Assignment
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:sz1)
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSub
                        left_token: <Left_DollarParen '$('>
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.Simple
                                words: [{(wc)} {(-c)}]
                                redirects: [
                                  (redir.Redir
                                    op: <Redir_Less '<'>
                                    fd: 16777215
                                    arg_word: {(DQ ($ VSub_Number '$1'))}
                                  )
                                ]
                              )
                            ]
                          )
                      )
                    }
                )
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.Simple
                  words: [
                    {(expr)}
                    {($ VSub_DollarName '$sz0')}
                    {(word_part.EscapedLiteral token:<Lit_EscapedChar '\\<'>)}
                    {($ VSub_DollarName '$sz1')}
                    {(word_part.EscapedLiteral token:<Lit_EscapedChar '\\*'>)}
                    {(2)}
                  ]
                  redirects: [(redir.Redir op:<Redir_Great '>'> fd:16777215 arg_word:{(/dev/null)})]
                )
                (command.Simple
                  words: [{(Lit_Other ':')}]
                  redirects: [
                    (redir.Redir
                      op: <Redir_Great '>'>
                      fd: 16777215
                      arg_word: {(DQ ($ VSub_Number '$1'))}
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.Case
      to_match: 
        {
          (word_part.CommandSub
            left_token: <Left_DollarParen '$('>
            command_list: (command.CommandList children:[(C {(uname)} {(-s)})])
          )
        }
      arms: [
        (case_arm
          pat_list: [{(Lit_Star '*') (MINGW) (Lit_Star '*')}]
          action: [
            (command.FuncDef
              name: sort
              body: (command.BraceGroup children:[(C {(/usr/bin/sort)} {(DQ ($ VSub_At '$@'))})])
            )
            (command.FuncDef
              name: find
              body: (command.BraceGroup children:[(C {(/usr/bin/find)} {(DQ ($ VSub_At '$@'))})])
            )
            (command.FuncDef
              name: pwd
              body: (command.BraceGroup children:[(C {(builtin)} {(pwd)} {(-W)})])
            )
            (command.FuncDef
              name: is_absolute_path
              body: 
                (command.BraceGroup
                  children: [
                    (command.Case
                      to_match: {(DQ ($ VSub_Number '$1'))}
                      arms: [
                        (case_arm
                          pat_list: [
                            {(Lit_LBracket '[') (/) 
                              (word_part.EscapedLiteral
                                token: <Lit_EscapedChar '\\\\'>
                              ) (Lit_RBracket ']') (Lit_Star '*')
                            }
                            {(Lit_LBracket '[') (A-Za-z) (Lit_RBracket ']') (Lit_Other ':') 
                              (Lit_Star '*')
                            }
                          ]
                          action: [
                            (command.ControlFlow
                              token: <ControlFlow_Return return>
                              arg_word: {(0)}
                            )
                          ]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(1)}
                    )
                  ]
                )
            )
          ]
        )
        (case_arm
          pat_list: [{(Lit_Star '*')}]
          action: [
            (command.FuncDef
              name: is_absolute_path
              body: 
                (command.BraceGroup
                  children: [
                    (command.Case
                      to_match: {(DQ ($ VSub_Number '$1'))}
                      arms: [
                        (case_arm
                          pat_list: [{(/) (Lit_Star '*')}]
                          action: [
                            (command.ControlFlow
                              token: <ControlFlow_Return return>
                              arg_word: {(0)}
                            )
                          ]
                        )
                      ]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Return return>
                      arg_word: {(1)}
                    )
                  ]
                )
            )
          ]
        )
      ]
    )
    (command.FuncDef
      name: git_dir_init
      body: 
        (command.BraceGroup
          children: [
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.Assignment
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:GIT_DIR)
                      op: Equal
                      rhs: 
                        {
                          (word_part.CommandSub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [(C {(git)} {(rev-parse)} {(--git-dir)})]
                              )
                          )
                        }
                    )
                  ]
                )
                (command.ControlFlow token:<ControlFlow_Exit exit>)
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(Lit_LBracket '[')} {(-z)} {(DQ ($ VSub_DollarName '$SUBDIRECTORY_OK'))} 
                      {(Lit_RBracket ']')}
                    )
                  ]
                  action: [
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(test)} {(-z)} 
                          {
                            (DQ 
                              (word_part.CommandSub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(git)} {(rev-parse)} {(--show-cdup)})]
                                  )
                              )
                            )
                          }
                        )
                        (command.BraceGroup
                          children: [
                            (command.Assignment
                              pairs: [
                                (assign_pair
                                  lhs: (lhs_expr.LhsName name:exit)
                                  op: Equal
                                  rhs: {($ VSub_QMark '$?')}
                                )
                              ]
                            )
                            (command.Simple
                              words: [
                                {(gettextln)}
                                {
                                  (DQ 
                                    (
'You need to run this command from the toplevel of the working tree.'
                                    )
                                  )
                                }
                              ]
                              redirects: [
                                (redir.Redir
                                  op: <Redir_GreatAnd '>&'>
                                  fd: 16777215
                                  arg_word: {(2)}
                                )
                              ]
                            )
                            (command.ControlFlow
                              token: <ControlFlow_Exit exit>
                              arg_word: {($ VSub_DollarName '$exit')}
                            )
                          ]
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DAmp Op_DPipe]
              children: [
                (C {(test)} {(-n)} {(DQ ($ VSub_DollarName '$GIT_DIR'))})
                (command.Assignment
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:GIT_DIR)
                      op: Equal
                      rhs: 
                        {
                          (word_part.CommandSub
                            left_token: <Left_DollarParen '$('>
                            command_list: 
                              (command.CommandList
                                children: [
                                  (command.AndOr
                                    ops: [Op_DAmp]
                                    children: [
                                      (C {(cd)} {(DQ ($ VSub_DollarName '$GIT_DIR'))})
                                      (C {(pwd)})
                                    ]
                                  )
                                ]
                              )
                          )
                        }
                    )
                  ]
                )
                (command.BraceGroup
                  children: [
                    (command.Simple
                      words: [
                        {(gettextln)}
                        {(DQ ('Unable to determine absolute path of git directory'))}
                      ]
                      redirects: [(redir.Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
                    )
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(1)}
                    )
                  ]
                )
              ]
            )
            (C {(Lit_Other ':')} 
              {
                (DQ 
                  (word_part.BracedVarSub
                    token: <VSub_Name GIT_OBJECT_DIRECTORY>
                    suffix_op: 
                      (suffix_op.Unary
                        op_id: VTest_Equals
                        arg_word: 
                          {
                            (DQ 
                              (word_part.CommandSub
                                left_token: <Left_DollarParen '$('>
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(git)} {(rev-parse)} {(--git-path)} {(objects)})]
                                  )
                              )
                            )
                          }
                      )
                  )
                )
              }
            )
          ]
        )
    )
    (command.If
      arms: [
        (if_arm
          cond: [(C {(test)} {(-z)} {(DQ ($ VSub_DollarName '$NONGIT_OK'))})]
          action: [(C {(git_dir_init)})]
        )
      ]
    )
    (command.FuncDef
      name: peel_committish
      body: 
        (command.BraceGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_Number '$1'))}
              arms: [
                (case_arm
                  pat_list: [{(Lit_Other ':') (/) (Lit_Star '*')}]
                  action: [
                    (command.AndOr
                      ops: [Op_DAmp]
                      children: [
                        (command.Assignment
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:peeltmp)
                              op: Equal
                              rhs: 
                                {
                                  (word_part.CommandSub
                                    left_token: <Left_DollarParen '$('>
                                    command_list: 
                                      (command.CommandList
                                        children: [
                                          (C {(git)} {(rev-parse)} {(--verify)} 
                                            {(DQ ($ VSub_Number '$1'))}
                                          )
                                        ]
                                      )
                                  )
                                }
                            )
                          ]
                        )
                        (C {(git)} {(rev-parse)} {(--verify)} {(DQ (${ VSub_Name peeltmp) ('^0'))})
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Star '*')}]
                  action: [(C {(git)} {(rev-parse)} {(--verify)} {(DQ (${ VSub_Number 1) ('^0'))})]
                )
              ]
            )
          ]
        )
    )
  ]
)