(command.CommandList
  children: [
    (C {(.)} {(git-sh-setup)})
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:LF) op:Equal rhs:{(SQ <'\n'>)})]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair lhs:(lhs_expr.LhsName name:bases) op:Equal rhs:(word.EmptyWord))
        (assign_pair lhs:(lhs_expr.LhsName name:head) op:Equal rhs:(word.EmptyWord))
        (assign_pair lhs:(lhs_expr.LhsName name:remotes) op:Equal rhs:(word.EmptyWord))
        (assign_pair lhs:(lhs_expr.LhsName name:sep_seen) op:Equal rhs:(word.EmptyWord))
      ]
    )
    (command.ForEach
      iter_name: arg
      do_arg_iter: T
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: 
                {
                  (DQ (',') ($ VSub_DollarName '$sep_seen') (',') ($ VSub_DollarName '$head') (',') 
                    ($ VSub_DollarName '$arg') (',')
                  )
                }
              arms: [
                (case_arm
                  pat_list: [{(Lit_Other '*') (Lit_Comma ',') (--) (Lit_Comma ',')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:sep_seen) op:Equal rhs:{(yes)})]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Comma ',') (yes) (Lit_Comma ',') (Lit_Comma ',') (Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:head)
                          op: Equal
                          rhs: {($ VSub_DollarName '$arg')}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Comma ',') (yes) (Lit_Comma ',') (Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:remotes)
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$remotes') ($ VSub_DollarName '$arg') (' '))}
                        )
                      ]
                    )
                  ]
                )
                (case_arm
                  pat_list: [{(Lit_Other '*')}]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:bases)
                          op: Equal
                          rhs: {(DQ ($ VSub_DollarName '$bases') ($ VSub_DollarName '$arg') (' '))}
                        )
                      ]
                    )
                  ]
                )
              ]
            )
          ]
        )
    )
    (command.Case
      to_match: {(DQ ($ VSub_DollarName '$remotes'))}
      arms: [
        (case_arm
          pat_list: [{(Lit_Other '?') (Lit_Other '*') (SQ <' '>) (Lit_Other '?') (Lit_Other '*')}]
        )
        (case_arm
          pat_list: [{(Lit_Other '*')}]
          action: [(command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(2)})]
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Pipeline
              children: [(C {(git)} {(diff-index)} {(--quiet)} {(--cached)} {(HEAD)} {(--)})]
              negated: T
            )
          ]
          action: [
            (C {(gettextln)} 
              {
                (DQ 
                  ('Error: Your local changes to the following files would be overwritten by merge')
                )
              }
            )
            (command.Pipeline
              children: [
                (C {(git)} {(diff-index)} {(--cached)} {(--name-only)} {(HEAD)} {(--)})
                (C {(sed)} {(-e)} {(SQ <'s/^/    /'>)})
              ]
              negated: F
            )
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(2)})
          ]
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:MRC)
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: 
                  (command.CommandList
                    children: [
                      (C {(git)} {(rev-parse)} {(--verify)} {(-q)} {($ VSub_DollarName '$head')})
                    ]
                  )
                left_token: <Left_CommandSub '$('>
              )
            }
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (lhs_expr.LhsName name:MRT)
          op: Equal
          rhs: 
            {
              (word_part.CommandSubPart
                command_list: (command.CommandList children:[(C {(git)} {(write-tree)})])
                left_token: <Left_CommandSub '$('>
              )
            }
        )
      ]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:NON_FF_MERGE) op:Equal rhs:{(0)})]
    )
    (command.Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(lhs_expr.LhsName name:OCTOPUS_FAILURE) op:Equal rhs:{(0)})]
    )
    (command.ForEach
      iter_name: SHA1
      iter_words: [{($ VSub_DollarName '$remotes')}]
      do_arg_iter: F
      body: 
        (command.DoGroup
          children: [
            (command.Case
              to_match: {(DQ ($ VSub_DollarName '$OCTOPUS_FAILURE'))}
              arms: [
                (case_arm
                  pat_list: [{(1)}]
                  action: [
                    (C {(gettextln)} {(DQ ('Automated merge did not work.'))})
                    (C {(gettextln)} {(DQ ('Should not be doing an octopus.'))})
                    (command.ControlFlow
                      token: <ControlFlow_Exit exit>
                      arg_word: {(2)}
                    )
                  ]
                )
              ]
            )
            (C {(eval)} 
              {(Lit_VarLike 'pretty_name=') 
                (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (Lit_LBrace '{') (GITHEAD_) ($ VSub_DollarName '$SHA1') (Lit_Other ':') (-) ($ VSub_DollarName '$SHA1') 
                (Lit_RBrace '}')
              }
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(test)} {(DQ ($ VSub_DollarName '$SHA1'))} {(Lit_Other '=')} 
                      {(DQ ($ VSub_DollarName '$pretty_name'))}
                    )
                  ]
                  action: [
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:SHA1_UP)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (word_part.CommandSubPart
                                  command_list: 
                                    (command.CommandList
                                      children: [
                                        (command.Pipeline
                                          children: [
                                            (C {(echo)} {(DQ ($ VSub_DollarName '$SHA1'))})
                                            (C {(tr)} {(a-z)} {(A-Z)})
                                          ]
                                          negated: F
                                        )
                                      ]
                                    )
                                  left_token: <Left_CommandSub '$('>
                                )
                              )
                            }
                        )
                      ]
                    )
                    (C {(eval)} 
                      {(Lit_VarLike 'pretty_name=') 
                        (word_part.EscapedLiteralPart
                          token: <Lit_EscapedChar '\\$'>
                        ) (Lit_LBrace '{') (GITHEAD_) ($ VSub_DollarName '$SHA1_UP') (Lit_Other ':') (-) 
                        ($ VSub_DollarName '$pretty_name') (Lit_RBrace '}')
                      }
                    )
                  ]
                )
              ]
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (command.Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (lhs_expr.LhsName name:common)
                      op: Equal
                      rhs: 
                        {
                          (word_part.CommandSubPart
                            command_list: 
                              (command.CommandList
                                children: [
                                  (C {(git)} {(merge-base)} {(--all)} {($ VSub_DollarName '$SHA1')} 
                                    {($ VSub_DollarName '$MRC')}
                                  )
                                ]
                              )
                            left_token: <Left_CommandSub '$('>
                          )
                        }
                    )
                  ]
                )
                (C {(die)} 
                  {
                    (DQ 
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (C {(eval_gettext)} 
                                {
                                  (DQ ('Unable to find common commit with ') 
                                    (word_part.EscapedLiteralPart
                                      token: <Lit_EscapedChar '\\$'>
                                    ) (pretty_name)
                                  )
                                }
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                      )
                    )
                  }
                )
              ]
            )
            (command.Case
              to_match: 
                {
                  (DQ ($ VSub_DollarName '$LF') ($ VSub_DollarName '$common') ($ VSub_DollarName '$LF'))
                }
              arms: [
                (case_arm
                  pat_list: [
                    {(Lit_Other '*') 
                      (DQ ($ VSub_DollarName '$LF') ($ VSub_DollarName '$SHA1') 
                        ($ VSub_DollarName '$LF')
                      ) (Lit_Other '*')
                    }
                  ]
                  action: [
                    (C {(eval_gettextln)} 
                      {
                        (DQ ('Already up-to-date with ') 
                          (word_part.EscapedLiteralPart
                            token: <Lit_EscapedChar '\\$'>
                          ) (pretty_name)
                        )
                      }
                    )
                    (command.ControlFlow token:<ControlFlow_Continue continue>)
                  ]
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [
                    (C {(test)} 
                      {(DQ ($ VSub_DollarName '$common') (',') ($ VSub_DollarName '$NON_FF_MERGE'))} {(Lit_Other '=')} {(DQ ($ VSub_DollarName '$MRC') (',0'))}
                    )
                  ]
                  action: [
                    (C {(eval_gettextln)} 
                      {
                        (DQ ('Fast-forwarding to: ') 
                          (word_part.EscapedLiteralPart
                            token: <Lit_EscapedChar '\\$'>
                          ) (pretty_name)
                        )
                      }
                    )
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(git)} {(read-tree)} {(-u)} {(-m)} {($ VSub_DollarName '$head')} 
                          {($ VSub_DollarName '$SHA1')}
                        )
                        (command.ControlFlow token:<ControlFlow_Exit exit>)
                      ]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:MRC)
                          op: Equal
                          rhs: {($ VSub_DollarName '$SHA1')}
                        )
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:MRT)
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [(C {(git)} {(write-tree)})]
                                  )
                                left_token: <Left_CommandSub '$('>
                              )
                            }
                        )
                      ]
                    )
                    (command.ControlFlow token:<ControlFlow_Continue continue>)
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [(assign_pair lhs:(lhs_expr.LhsName name:NON_FF_MERGE) op:Equal rhs:{(1)})]
            )
            (C {(eval_gettextln)} 
              {
                (DQ ('Trying simple merge with ') 
                  (word_part.EscapedLiteralPart token:<Lit_EscapedChar '\\$'>) (pretty_name)
                )
              }
            )
            (command.AndOr
              ops: [Op_DPipe]
              children: [
                (C {(git)} {(read-tree)} {(-u)} {(-m)} {(--aggressive)} {($ VSub_DollarName '$common')} 
                  {($ VSub_DollarName '$MRT')} {($ VSub_DollarName '$SHA1')}
                )
                (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(2)})
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:next)
                  op: Equal
                  rhs: 
                    {
                      (word_part.CommandSubPart
                        command_list: 
                          (command.CommandList
                            children: [
                              (command.SimpleCommand
                                words: [{(git)} {(write-tree)}]
                                redirects: [
                                  (redir.Redir
                                    op: <Redir_Great '2>'>
                                    fd: 2
                                    arg_word: {(/dev/null)}
                                  )
                                ]
                              )
                            ]
                          )
                        left_token: <Left_CommandSub '$('>
                      )
                    }
                )
              ]
            )
            (command.If
              arms: [
                (if_arm
                  cond: [(C {(test)} {($ VSub_QMark '$?')} {(-ne)} {(0)})]
                  action: [
                    (C {(gettextln)} {(DQ ('Simple merge did not work, trying automatic merge.'))})
                    (command.AndOr
                      ops: [Op_DPipe]
                      children: [
                        (C {(git-merge-index)} {(-o)} {(git-merge-one-file)} {(-a)})
                        (command.Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (lhs_expr.LhsName name:OCTOPUS_FAILURE)
                              op: Equal
                              rhs: {(1)}
                            )
                          ]
                        )
                      ]
                    )
                    (command.Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (lhs_expr.LhsName name:next)
                          op: Equal
                          rhs: 
                            {
                              (word_part.CommandSubPart
                                command_list: 
                                  (command.CommandList
                                    children: [
                                      (command.SimpleCommand
                                        words: [{(git)} {(write-tree)}]
                                        redirects: [
                                          (redir.Redir
                                            op: <Redir_Great '2>'>
                                            fd: 2
                                            arg_word: {(/dev/null)}
                                          )
                                        ]
                                      )
                                    ]
                                  )
                                left_token: <Left_CommandSub '$('>
                              )
                            }
                        )
                      ]
                    )
                  ]
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:MRC)
                  op: Equal
                  rhs: {(DQ ($ VSub_DollarName '$MRC') (' ') ($ VSub_DollarName '$SHA1'))}
                )
              ]
            )
            (command.Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (lhs_expr.LhsName name:MRT)
                  op: Equal
                  rhs: {($ VSub_DollarName '$next')}
                )
              ]
            )
          ]
        )
    )
    (command.ControlFlow
      token: <ControlFlow_Exit exit>
      arg_word: {(DQ ($ VSub_DollarName '$OCTOPUS_FAILURE'))}
    )
  ]
)