(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:USAGE)
          op: Equal
          rhs: {(DQ ("(edit [-F <file> | -m <msg>] | show) [commit]"))}
          spids: [4]
        )
      ]
      spids: [4]
    )
    (C {(.)} {(git-sh-setup)})
    (AndOr children:[(C {(test)} {(-z)} {(DQ ($ VSub_Number "$1"))})(C {(usage)})] op_id:Op_DAmp)
    (Sentence
      child: 
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:ACTION)
              op: Equal
              rhs: {(DQ ($ VSub_Number "$1"))}
              spids: [26]
            )
          ]
          spids: [26]
        )
      terminator: <Op_Semi ";">
    )
    (C {(shift)})
    (AndOr
      children: [
        (C {(test)} {(-z)} {(DQ ($ VSub_Name "$GIT_NOTES_REF"))})
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:GIT_NOTES_REF)
              op: Equal
              rhs: 
                {
                  (DQ 
                    (CommandSubPart
                      command_list: (CommandList children:[(C {(git)} {(config)} {(core.notesref)})])
                      left_token: <Left_CommandSub "$(">
                      spids: [47 53]
                    )
                  )
                }
              spids: [45]
            )
          ]
          spids: [45]
        )
      ]
      op_id: Op_DAmp
    )
    (AndOr
      children: [
        (C {(test)} {(-z)} {(DQ ($ VSub_Name "$GIT_NOTES_REF"))})
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:GIT_NOTES_REF)
              op: Equal
              rhs: {(DQ (refs/notes/commits))}
              spids: [66]
            )
          ]
          spids: [66]
        )
      ]
      op_id: Op_DAmp
    )
    (Assignment
      keyword: Assign_None
      pairs: [(assign_pair lhs:(LhsName name:MESSAGE) op:Equal rhs:{(SQ )} spids:[72])]
      spids: [72]
    )
    (While
      cond: [(C {(test)} {($ VSub_Pound "$#")} {(KW_Bang "!") (Lit_Other "=")} {(0)})]
      body: 
        (DoGroup
          children: [
            (Case
              to_match: {(DQ ($ VSub_Number "$1"))}
              arms: [
                (case_arm
                  pat_list: [{(-m)}]
                  action: [
                    (AndOr
                      children: [
                        (C {(test)} {(DQ ($ VSub_Name "$ACTION"))} {(Lit_Other "=")} {(DQ (edit))})
                        (C {(usage)})
                      ]
                      op_id: Op_DPipe
                    )
                    (C {(shift)})
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(test)} {(DQ ($ VSub_Pound "$#"))} {(Lit_Other "=")} {(DQ (0))})
                              terminator: <Op_Semi ";">
                            )
                          ]
                          action: [(C {(die)} {(DQ ("error: option -m needs an argument"))})]
                          spids: [-1 136]
                        )
                      ]
                      else_action: [
                        (If
                          arms: [
                            (if_arm
                              cond: [
                                (Sentence
                                  child: 
                                    (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$MESSAGE"))} 
                                      {(Lit_Other "]")}
                                    )
                                  terminator: <Op_Semi ";">
                                )
                              ]
                              action: [
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:MESSAGE)
                                      op: Equal
                                      rhs: {(DQ ($ VSub_Number "$1"))}
                                      spids: [165]
                                    )
                                  ]
                                  spids: [165]
                                )
                              ]
                              spids: [-1 162]
                            )
                          ]
                          else_action: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:MESSAGE)
                                  op: Equal
                                  rhs: 
                                    {
                                      (DQ ($ VSub_Name "$MESSAGE") ("\n") ("\n") ($ VSub_Number "$1"))
                                    }
                                  spids: [174]
                                )
                              ]
                              spids: [174]
                            )
                          ]
                          spids: [171 183]
                        )
                        (C {(shift)})
                      ]
                      spids: [146 189]
                    )
                  ]
                  spids: [97 98 192 -1]
                )
                (case_arm
                  pat_list: [{(-F)}]
                  action: [
                    (AndOr
                      children: [
                        (C {(test)} {(DQ ($ VSub_Name "$ACTION"))} {(Lit_Other "=")} {(DQ (edit))})
                        (C {(usage)})
                      ]
                      op_id: Op_DPipe
                    )
                    (C {(shift)})
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(test)} {(DQ ($ VSub_Pound "$#"))} {(Lit_Other "=")} {(DQ (0))})
                              terminator: <Op_Semi ";">
                            )
                          ]
                          action: [(C {(die)} {(DQ ("error: option -F needs an argument"))})]
                          spids: [-1 234]
                        )
                      ]
                      else_action: [
                        (If
                          arms: [
                            (if_arm
                              cond: [
                                (Sentence
                                  child: 
                                    (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$MESSAGE"))} 
                                      {(Lit_Other "]")}
                                    )
                                  terminator: <Op_Semi ";">
                                )
                              ]
                              action: [
                                (Assignment
                                  keyword: Assign_None
                                  pairs: [
                                    (assign_pair
                                      lhs: (LhsName name:MESSAGE)
                                      op: Equal
                                      rhs: 
                                        {
                                          (DQ 
                                            (CommandSubPart
                                              command_list: 
                                                (CommandList
                                                  children: [(C {(cat)} {(DQ ($ VSub_Number "$1"))})]
                                                )
                                              left_token: <Left_CommandSub "$(">
                                              spids: [265 271]
                                            )
                                          )
                                        }
                                      spids: [263]
                                    )
                                  ]
                                  spids: [263]
                                )
                              ]
                              spids: [-1 260]
                            )
                          ]
                          else_action: [
                            (Assignment
                              keyword: Assign_None
                              pairs: [
                                (assign_pair
                                  lhs: (LhsName name:MESSAGE)
                                  op: Equal
                                  rhs: 
                                    {
                                      (DQ ($ VSub_Name "$MESSAGE") ("\n") ("\n") 
                                        (CommandSubPart
                                          command_list: 
                                            (CommandList
                                              children: [(C {(cat)} {(DQ ($ VSub_Number "$1"))})]
                                            )
                                          left_token: <Left_CommandSub "$(">
                                          spids: [283 289]
                                        )
                                      )
                                    }
                                  spids: [278]
                                )
                              ]
                              spids: [278]
                            )
                          ]
                          spids: [275 293]
                        )
                        (C {(shift)})
                      ]
                      spids: [244 299]
                    )
                  ]
                  spids: [195 196 302 -1]
                )
                (case_arm
                  pat_list: [{(-) (Lit_Other "*")}]
                  action: [(C {(usage)})]
                  spids: [305 307 313 -1]
                )
                (case_arm
                  pat_list: [{(Lit_Other "*")}]
                  action: [(ControlFlow token:<ControlFlow_Break break>)]
                  spids: [316 317 323 -1]
                )
              ]
              spids: [88 94 326]
            )
          ]
          spids: [85 328]
        )
    )
    (AndOr
      children: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:COMMIT)
              op: Equal
              rhs: 
                {
                  (CommandSubPart
                    command_list: 
                      (CommandList
                        children: [
                          (C {(git)} {(rev-parse)} {(--verify)} {(--default)} {(HEAD)} 
                            {(DQ ($ VSub_At "$@"))}
                          )
                        ]
                      )
                    left_token: <Left_CommandSub "$(">
                    spids: [332 346]
                  )
                }
              spids: [331]
            )
          ]
          spids: [331]
        )
        (C {(die)} {(DQ ("Invalid commit: ") ($ VSub_At "$@"))})
      ]
      op_id: Op_DPipe
    )
    (Case
      to_match: {(DQ ($ VSub_Name "$ACTION"))}
      arms: [
        (case_arm
          pat_list: [{(edit)}]
          action: [
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} 
                          {
                            (DQ 
                              (BracedVarSub
                                token: <VSub_Name GIT_NOTES_REF>
                                suffix_op: 
                                  (StringUnary
                                    op_id: VOp1_Pound
                                    arg_word: {(refs) (Lit_Slash /) (notes) (Lit_Slash /)}
                                  )
                                spids: [375 382]
                              )
                            )
                          } {(Lit_Other "=")} {(DQ ($ VSub_Name "$GIT_NOTES_REF"))} {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (C {(die)} 
                      {
                        (DQ ("Refusing to edit notes in ") ($ VSub_Name "$GIT_NOTES_REF") 
                          (" (outside of refs/notes/)")
                        )
                      }
                    )
                  ]
                  spids: [-1 394]
                )
              ]
              spids: [-1 406]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:MSG_FILE)
                  op: Equal
                  rhs: {(DQ ($ VSub_Name "$GIT_DIR") (/new-notes-) ($ VSub_Name "$COMMIT"))}
                  spids: [410]
                )
              ]
              spids: [410]
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:GIT_INDEX_FILE)
                  op: Equal
                  rhs: {(DQ ($ VSub_Name "$MSG_FILE") (.idx))}
                  spids: [418]
                )
              ]
              spids: [418]
            )
            (C {(export)} {(GIT_INDEX_FILE)})
            (C {(trap)} 
              {
                (SQ <"\n"> <"\t\ttest -f \"$MSG_FILE\" && rm \"$MSG_FILE\"\n"> 
                  <"\t\ttest -f \"$GIT_INDEX_FILE\" && rm \"$GIT_INDEX_FILE\"\n"> <"\t">
                )
              } {(0)}
            )
            (Assignment
              keyword: Assign_None
              pairs: [
                (assign_pair
                  lhs: (LhsName name:CURRENT_HEAD)
                  op: Equal
                  rhs: 
                    {
                      (CommandSubPart
                        command_list: 
                          (CommandList
                            children: [
                              (Pipeline
                                children: [
                                  (C {(git)} {(show-ref)} {(DQ ($ VSub_Name "$GIT_NOTES_REF"))})
                                  (C {(cut)} {(-f)} {(1)} {(-d)} {(SQ <" ">)})
                                ]
                                negated: False
                              )
                            ]
                          )
                        left_token: <Left_CommandSub "$(">
                        spids: [445 467]
                      )
                    }
                  spids: [444]
                )
              ]
              spids: [444]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$CURRENT_HEAD"))} 
                          {(Lit_Other "]")}
                        )
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:PARENT)
                          op: Equal
                          rhs: {(SQ )}
                          spids: [486]
                        )
                      ]
                      spids: [486]
                    )
                  ]
                  spids: [-1 483]
                )
              ]
              else_action: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:PARENT)
                      op: Equal
                      rhs: {(DQ ("-p ") ($ VSub_Name "$CURRENT_HEAD"))}
                      spids: [492]
                    )
                  ]
                  spids: [492]
                )
                (AndOr
                  children: [
                    (C {(git)} {(read-tree)} {(DQ ($ VSub_Name "$GIT_NOTES_REF"))})
                    (C {(die)} {(DQ ("Could not read index"))})
                  ]
                  op_id: Op_DPipe
                )
              ]
              spids: [489 516]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-z)} {(DQ ($ VSub_Name "$MESSAGE"))} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (Pipeline
                      children: [
                        (SimpleCommand
                          words: [{(git)} {(log)} {(-1)} {($ VSub_Name "$COMMIT")}]
                          more_env: [(env_pair name:GIT_NOTES_REF val:{(SQ )} spids:[536])]
                        )
                        (SimpleCommand
                          words: [{(sed)} {(DQ ("s/^/#/"))}]
                          redirects: [
                            (Redir
                              op_id: Redir_Great
                              fd: -1
                              arg_word: {(DQ ($ VSub_Name "$MSG_FILE"))}
                              spids: [554]
                            )
                          ]
                        )
                      ]
                      negated: False
                    )
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(Lit_Other "[")} {(KW_Bang "!")} {(-z)} 
                                  {(DQ ($ VSub_Name "$CURRENT_HEAD"))} {(Lit_Other "]")}
                                )
                              terminator: <Op_Semi ";">
                            )
                          ]
                          action: [
                            (SimpleCommand
                              words: [
                                {(git)}
                                {(cat-file)}
                                {(blob)}
                                {(Lit_Other ":") ($ VSub_Name "$COMMIT")}
                              ]
                              redirects: [
                                (Redir
                                  op_id: Redir_DGreat
                                  fd: -1
                                  arg_word: {(DQ ($ VSub_Name "$MSG_FILE"))}
                                  spids: [588]
                                )
                                (Redir
                                  op_id: Redir_Great
                                  fd: 2
                                  arg_word: {(/dev/null)}
                                  spids: [594]
                                )
                              ]
                            )
                          ]
                          spids: [-1 576]
                        )
                      ]
                      spids: [-1 599]
                    )
                    (Assignment
                      keyword: Assign_None
                      pairs: [
                        (assign_pair
                          lhs: (LhsName name:core_editor)
                          op: Equal
                          rhs: 
                            {
                              (DQ 
                                (CommandSubPart
                                  command_list: 
                                    (CommandList
                                      children: [(C {(git)} {(config)} {(core.editor)})]
                                    )
                                  left_token: <Left_CommandSub "$(">
                                  spids: [604 610]
                                )
                              )
                            }
                          spids: [602]
                        )
                      ]
                      spids: [602]
                    )
                    (C 
                      {
                        (BracedVarSub
                          token: <VSub_Name GIT_EDITOR>
                          suffix_op: 
                            (StringUnary
                              op_id: VTest_ColonHyphen
                              arg_word: 
                                {
                                  (BracedVarSub
                                    token: <VSub_Name core_editor>
                                    suffix_op: 
                                      (StringUnary
                                        op_id: VTest_ColonHyphen
                                        arg_word: 
                                          {
                                            (BracedVarSub
                                              token: <VSub_Name VISUAL>
                                              suffix_op: 
                                                (StringUnary
                                                  op_id: VTest_ColonHyphen
                                                  arg_word: 
                                                    {
                                                      (BracedVarSub
                                                        token: <VSub_Name EDITOR>
                                                        suffix_op: 
                                                          (StringUnary
                                                            op_id: VTest_ColonHyphen
                                                            arg_word: {(vi)}
                                                          )
                                                        spids: [623 627]
                                                      )
                                                    }
                                                )
                                              spids: [620 628]
                                            )
                                          }
                                      )
                                    spids: [617 629]
                                  )
                                }
                            )
                          spids: [614 630]
                        )
                      } {(DQ ($ VSub_Name "$MSG_FILE"))}
                    )
                  ]
                  spids: [-1 533]
                )
              ]
              else_action: [
                (SimpleCommand
                  words: [{(echo)} {(DQ ($ VSub_Name "$MESSAGE"))}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: -1
                      arg_word: {(DQ ($ VSub_Name "$MSG_FILE"))}
                      spids: [646]
                    )
                  ]
                )
              ]
              spids: [637 653]
            )
            (Pipeline
              children: [
                (SimpleCommand
                  words: [{(grep)} {(-v)} {(Lit_Other "^") (Lit_Pound "#")}]
                  redirects: [
                    (Redir
                      op_id: Redir_Less
                      fd: -1
                      arg_word: {(DQ ($ VSub_Name "$MSG_FILE"))}
                      spids: [664]
                    )
                  ]
                )
                (SimpleCommand
                  words: [{(git)} {(stripspace)}]
                  redirects: [
                    (Redir
                      op_id: Redir_Great
                      fd: -1
                      arg_word: {(DQ ($ VSub_Name "$MSG_FILE")) (.processed)}
                      spids: [676]
                    )
                  ]
                )
              ]
              negated: False
            )
            (C {(mv)} {(DQ ($ VSub_Name "$MSG_FILE")) (.processed)} {(DQ ($ VSub_Name "$MSG_FILE"))})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (C {(Lit_Other "[")} {(-s)} {(DQ ($ VSub_Name "$MSG_FILE"))} {(Lit_Other "]")})
                      terminator: <Op_Semi ";">
                    )
                  ]
                  action: [
                    (AndOr
                      children: [
                        (Assignment
                          keyword: Assign_None
                          pairs: [
                            (assign_pair
                              lhs: (LhsName name:BLOB)
                              op: Equal
                              rhs: 
                                {
                                  (CommandSubPart
                                    command_list: 
                                      (CommandList
                                        children: [
                                          (C {(git)} {(hash-object)} {(-w)} 
                                            {(DQ ($ VSub_Name "$MSG_FILE"))}
                                          )
                                        ]
                                      )
                                    left_token: <Left_CommandSub "$(">
                                    spids: [713 723]
                                  )
                                }
                              spids: [712]
                            )
                          ]
                          spids: [712]
                        )
                        (C {(die)} {(DQ ("Could not write into object database"))})
                      ]
                      op_id: Op_DPipe
                    )
                    (AndOr
                      children: [
                        (C {(git)} {(update-index)} {(--add)} {(--cacheinfo)} {(0644)} 
                          {($ VSub_Name "$BLOB")} {($ VSub_Name "$COMMIT")}
                        )
                        (C {(die)} {(DQ ("Could not write index"))})
                      ]
                      op_id: Op_DPipe
                    )
                  ]
                  spids: [-1 709]
                )
              ]
              else_action: [
                (AndOr
                  children: [
                    (C {(test)} {(-z)} {(DQ ($ VSub_Name "$CURRENT_HEAD"))})
                    (C {(die)} {(DQ ("Will not initialise with empty tree"))})
                  ]
                  op_id: Op_DAmp
                )
                (AndOr
                  children: [
                    (C {(git)} {(update-index)} {(--force-remove)} {($ VSub_Name "$COMMIT")})
                    (C {(die)} {(DQ ("Could not update index"))})
                  ]
                  op_id: Op_DPipe
                )
              ]
              spids: [759 798]
            )
            (AndOr
              children: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:TREE)
                      op: Equal
                      rhs: 
                        {
                          (CommandSubPart
                            command_list: (CommandList children:[(C {(git)} {(write-tree)})])
                            left_token: <Left_CommandSub "$(">
                            spids: [803 807]
                          )
                        }
                      spids: [802]
                    )
                  ]
                  spids: [802]
                )
                (C {(die)} {(DQ ("Could not write tree"))})
              ]
              op_id: Op_DPipe
            )
            (AndOr
              children: [
                (Assignment
                  keyword: Assign_None
                  pairs: [
                    (assign_pair
                      lhs: (LhsName name:NEW_HEAD)
                      op: Equal
                      rhs: 
                        {
                          (CommandSubPart
                            command_list: 
                              (CommandList
                                children: [
                                  (Pipeline
                                    children: [
                                      (C {(echo)} {(Annotate)} {($ VSub_Name "$COMMIT")})
                                      (C {(git)} {(commit-tree)} {($ VSub_Name "$TREE")} 
                                        {($ VSub_Name "$PARENT")}
                                      )
                                    ]
                                    negated: False
                                  )
                                ]
                              )
                            left_token: <Left_CommandSub "$(">
                            spids: [819 835]
                          )
                        }
                      spids: [818]
                    )
                  ]
                  spids: [818]
                )
                (C {(die)} {(DQ ("Could not annotate"))})
              ]
              op_id: Op_DPipe
            )
            (C {(git)} {(update-ref)} {(-m)} {(DQ ("Annotate ") ($ VSub_Name "$COMMIT"))} 
              {(DQ ($ VSub_Name "$GIT_NOTES_REF"))} {($ VSub_Name "$NEW_HEAD")} {($ VSub_Name "$CURRENT_HEAD")}
            )
          ]
          spids: [366 367 868 -1]
        )
        (case_arm
          pat_list: [{(show)}]
          action: [
            (AndOr
              children: [
                (SimpleCommand
                  words: [
                    {(git)}
                    {(rev-parse)}
                    {(-q)}
                    {(--verify)}
                    {(DQ ($ VSub_Name "$GIT_NOTES_REF")) (Lit_Other ":") ($ VSub_Name "$COMMIT")}
                  ]
                  redirects: [(Redir op_id:Redir_Great fd:-1 arg_word:{(/dev/null)} spids:[888])]
                )
                (C {(die)} {(DQ ("No note for commit ") ($ VSub_Name "$COMMIT") (.))})
              ]
              op_id: Op_DPipe
            )
            (C {(git)} {(show)} 
              {(DQ ($ VSub_Name "$GIT_NOTES_REF")) (Lit_Other ":") ($ VSub_Name "$COMMIT")}
            )
          ]
          spids: [870 871 914 -1]
        )
        (case_arm pat_list:[{(Lit_Other "*")}] action:[(C {(usage)})] spids:[916917-1922])
      ]
      spids: [358 364 922]
    )
  ]
)