code: def needs_abort():
      
      for line in status().splitlines():
          if '--abort' in line:
              for part in line.split('"'):
                  if '--abort' in part:
                      return part
          elif 'All conflicts fixed but you are still merging' in line:
              return 'git merge --abort'
          elif 'You have unmerged paths.' in line:
              return 'git merge --abort'
          elif 'all conflicts fixed: run "git rebase --continue"' in line:
              return 'git rebase --abort'
      return None
docs: A command to abort an operation in progress
  
      For example a merge, cherry-pick or rebase
      If one of these operations has left the repo conflicted
          then give a command to abandon the operation