(command.CommandList
  children: [
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:test_description)
          op: assign_op.Equal
          rhs: {(SQ <'git status advice'>)}
          spids: [19]
        )
      ]
    )
    (C {<.>} {<'./test-lib.sh'>})
    (C {<.>} {(DQ ($ Id.VSub_DollarName '$TEST_DIRECTORY')) <'/lib-rebase.sh'>})
    (C {<set_fake_editor>})
    (C {<test_expect_success>} {(SQ <'prepare for conflicts'>)} 
      {
        (SQ <'\n'> <'\tgit config --global advice.statusuoption false &&\n'> 
          <'\ttest_commit init main.txt init &&\n'> <'\tgit branch conflicts &&\n'> <'\ttest_commit on_master main.txt on_master &&\n'> 
          <'\tgit checkout conflicts &&\n'> <'\ttest_commit on_conflicts main.txt on_conflicts\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status when conflicts unresolved'>)} 
      {
        (SQ <'\n'> <'\ttest_must_fail git merge master &&\n'> <'\tcat >expected <<\\EOF &&\n'> 
          <'On branch conflicts\n'> <'You have unmerged paths.\n'> <'  (fix conflicts and run "git commit")\n'> 
          <'  (use "git merge --abort" to abort the merge)\n'> <'\n'> <'Unmerged paths:\n'> <'  (use "git add <file>..." to mark resolution)\n'> <'\n'> 
          <'\tboth modified:   main.txt\n'> <'\n'> <'no changes added to commit (use "git add" and/or "git commit -a")\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status when conflicts resolved before commit'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard conflicts &&\n'> <'\ttest_must_fail git merge master &&\n'> 
          <'\techo one >main.txt &&\n'> <'\tgit add main.txt &&\n'> <'\tcat >expected <<\\EOF &&\n'> <'On branch conflicts\n'> 
          <'All conflicts fixed but you are still merging.\n'> <'  (use "git commit" to conclude merge)\n'> <'\n'> <'Changes to be committed:\n'> <'\n'> 
          <'\tmodified:   main.txt\n'> <'\n'> <'Untracked files not listed (use -u option to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'prepare for rebase conflicts'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard master &&\n'> <'\tgit checkout -b rebase_conflicts &&\n'> 
          <'\ttest_commit one_rebase main.txt one &&\n'> <'\ttest_commit two_rebase main.txt two &&\n'> <'\ttest_commit three_rebase main.txt three\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status when rebase in progress before resolving conflicts'>)} 
      {
        (SQ <'\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> 
          <'\tONTO=$(git rev-parse --short HEAD^^) &&\n'> <'\ttest_must_fail git rebase HEAD^ --onto HEAD^^ &&\n'> <'\tcat >expected <<EOF &&\n'> 
          <'rebase in progress; onto $ONTO\n'> <'You are currently rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <rebase_conflicts>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (fix conflicts and then run "git rebase --continue")\n'> 
          <'  (use "git rebase --skip" to skip this patch)\n'> <'  (use "git rebase --abort" to check out the original branch)\n'> <'\n'> <'Unmerged paths:\n'> 
          <'  (use "git reset HEAD <file>..." to unstage)\n'> <'  (use "git add <file>..." to mark resolution)\n'> <'\n'> <'\tboth modified:   main.txt\n'> <'\n'> 
          <'no changes added to commit (use "git add" and/or "git commit -a")\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status when rebase in progress before rebase --continue'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard rebase_conflicts &&\n'> 
          <'\ttest_when_finished "git rebase --abort" &&\n'> <'\tONTO=$(git rev-parse --short HEAD^^) &&\n'> 
          <'\ttest_must_fail git rebase HEAD^ --onto HEAD^^ &&\n'> <'\techo three >main.txt &&\n'> <'\tgit add main.txt &&\n'> <'\tcat >expected <<EOF &&\n'> 
          <'rebase in progress; onto $ONTO\n'> <'You are currently rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <rebase_conflicts>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (all conflicts fixed: run "git rebase --continue")\n'> <'\n'> 
          <'Changes to be committed:\n'> <'  (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tmodified:   main.txt\n'> <'\n'> 
          <'Untracked files not listed (use -u option to show untracked files)\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'prepare for rebase_i_conflicts'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard master &&\n'> <'\tgit checkout -b rebase_i_conflicts &&\n'> 
          <'\ttest_commit one_unmerge main.txt one_unmerge &&\n'> <'\tgit branch rebase_i_conflicts_second &&\n'> <'\ttest_commit one_master main.txt one_master &&\n'> 
          <'\tgit checkout rebase_i_conflicts_second &&\n'> <'\ttest_commit one_second main.txt one_second\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status during rebase -i when conflicts unresolved'>)} 
      {
        (SQ <'\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> 
          <'\tONTO=$(git rev-parse --short rebase_i_conflicts) &&\n'> <'\tLAST_COMMIT=$(git rev-parse --short rebase_i_conflicts_second) &&\n'> 
          <'\ttest_must_fail git rebase -i rebase_i_conflicts &&\n'> <'\tcat >expected <<EOF &&\n'> <'interactive rebase in progress; onto $ONTO\n'> 
          <'Last command done (1 command done):\n'> <'   pick $LAST_COMMIT one_second\n'> <'No commands remaining.\n'> 
          <'You are currently rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <rebase_i_conflicts_second>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (fix conflicts and then run "git rebase --continue")\n'> 
          <'  (use "git rebase --skip" to skip this patch)\n'> <'  (use "git rebase --abort" to check out the original branch)\n'> <'\n'> <'Unmerged paths:\n'> 
          <'  (use "git reset HEAD <file>..." to unstage)\n'> <'  (use "git add <file>..." to mark resolution)\n'> <'\n'> <'\tboth modified:   main.txt\n'> <'\n'> 
          <'no changes added to commit (use "git add" and/or "git commit -a")\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status during rebase -i after resolving conflicts'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard rebase_i_conflicts_second &&\n'> 
          <'\ttest_when_finished "git rebase --abort" &&\n'> <'\tONTO=$(git rev-parse --short rebase_i_conflicts) &&\n'> 
          <'\tLAST_COMMIT=$(git rev-parse --short rebase_i_conflicts_second) &&\n'> <'\ttest_must_fail git rebase -i rebase_i_conflicts &&\n'> <'\tgit add main.txt &&\n'> 
          <'\tcat >expected <<EOF &&\n'> <'interactive rebase in progress; onto $ONTO\n'> <'Last command done (1 command done):\n'> 
          <'   pick $LAST_COMMIT one_second\n'> <'No commands remaining.\n'> <'You are currently rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <rebase_i_conflicts_second>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (all conflicts fixed: run "git rebase --continue")\n'> <'\n'> 
          <'Changes to be committed:\n'> <'  (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tmodified:   main.txt\n'> <'\n'> 
          <'Untracked files not listed (use -u option to show untracked files)\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status when rebasing -i in edit mode'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard master &&\n'> <'\tgit checkout -b rebase_i_edit &&\n'> 
          <'\ttest_commit one_rebase_i main.txt one &&\n'> <'\ttest_commit two_rebase_i main.txt two &&\n'> 
          <'\tCOMMIT2=$(git rev-parse --short rebase_i_edit) &&\n'> <'\ttest_commit three_rebase_i main.txt three &&\n'> 
          <'\tCOMMIT3=$(git rev-parse --short rebase_i_edit) &&\n'> <'\tFAKE_LINES="1 edit 2" &&\n'> <'\texport FAKE_LINES &&\n'> 
          <'\ttest_when_finished "git rebase --abort" &&\n'> <'\tONTO=$(git rev-parse --short HEAD~2) &&\n'> <'\tgit rebase -i HEAD~2 &&\n'> 
          <'\tcat >expected <<EOF &&\n'> <'interactive rebase in progress; onto $ONTO\n'> <'Last commands done (2 commands done):\n'> 
          <'   pick $COMMIT2 two_rebase_i\n'> <'   edit $COMMIT3 three_rebase_i\n'> <'No commands remaining.\n'> 
          <'You are currently editing a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <rebase_i_edit>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (use "git commit --amend" to amend the current commit)\n'> 
          <'  (use "git rebase --continue" once you are satisfied with your changes)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status when splitting a commit'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard master &&\n'> <'\tgit checkout -b split_commit &&\n'> 
          <'\ttest_commit one_split main.txt one &&\n'> <'\ttest_commit two_split main.txt two &&\n'> <'\tCOMMIT2=$(git rev-parse --short split_commit) &&\n'> 
          <'\ttest_commit three_split main.txt three &&\n'> <'\tCOMMIT3=$(git rev-parse --short split_commit) &&\n'> 
          <'\ttest_commit four_split main.txt four &&\n'> <'\tCOMMIT4=$(git rev-parse --short split_commit) &&\n'> <'\tFAKE_LINES="1 edit 2 3" &&\n'> 
          <'\texport FAKE_LINES &&\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> 
          <'\tgit rebase -i HEAD~3 &&\n'> <'\tgit reset HEAD^ &&\n'> <'\tcat >expected <<EOF &&\n'> 
          <'interactive rebase in progress; onto $ONTO\n'> <'Last commands done (2 commands done):\n'> <'   pick $COMMIT2 two_split\n'> 
          <'   edit $COMMIT3 three_split\n'> <'Next command to do (1 remaining command):\n'> <'   pick $COMMIT4 four_split\n'> 
          <'  (use "git rebase --edit-todo" to view and edit)\n'> <'You are currently splitting a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <split_commit>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (Once your working directory is clean, run "git rebase --continue")\n'> <'\n'> 
          <'Changes not staged for commit:\n'> <'  (use "git add <file>..." to update what will be committed)\n'> 
          <'  (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified:   main.txt\n'> <'\n'> 
          <'no changes added to commit (use "git add" and/or "git commit -a")\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} 
      {(SQ <'status after editing the last commit with --amend during a rebase -i'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard master &&\n'> <'\tgit checkout -b amend_last &&\n'> 
          <'\ttest_commit one_amend main.txt one &&\n'> <'\ttest_commit two_amend main.txt two &&\n'> <'\ttest_commit three_amend main.txt three &&\n'> 
          <'\tCOMMIT3=$(git rev-parse --short amend_last) &&\n'> <'\ttest_commit four_amend main.txt four &&\n'> <'\tCOMMIT4=$(git rev-parse --short amend_last) &&\n'> 
          <'\tFAKE_LINES="1 2 edit 3" &&\n'> <'\texport FAKE_LINES &&\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> 
          <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> <'\tgit rebase -i HEAD~3 &&\n'> <'\tgit commit --amend -m "foo" &&\n'> <'\tcat >expected <<EOF &&\n'> 
          <'interactive rebase in progress; onto $ONTO\n'> <'Last commands done (3 commands done):\n'> <'   pick $COMMIT3 three_amend\n'> 
          <'   edit $COMMIT4 four_amend\n'> <'  (see more in file .git/rebase-merge/done)\n'> <'No commands remaining.\n'> 
          <'You are currently editing a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <amend_last>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (use "git commit --amend" to amend the current commit)\n'> 
          <'  (use "git rebase --continue" once you are satisfied with your changes)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'prepare for several edits'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard master &&\n'> <'\tgit checkout -b several_edits &&\n'> 
          <'\ttest_commit one_edits main.txt one &&\n'> <'\ttest_commit two_edits main.txt two &&\n'> <'\ttest_commit three_edits main.txt three &&\n'> 
          <'\ttest_commit four_edits main.txt four\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status: (continue first edit) second edit'>)} 
      {
        (SQ <'\n'> <'\tFAKE_LINES="edit 1 edit 2 3" &&\n'> <'\texport FAKE_LINES &&\n'> 
          <'\ttest_when_finished "git rebase --abort" &&\n'> <'\tCOMMIT2=$(git rev-parse --short several_edits^^) &&\n'> 
          <'\tCOMMIT3=$(git rev-parse --short several_edits^) &&\n'> <'\tCOMMIT4=$(git rev-parse --short several_edits) &&\n'> 
          <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> <'\tgit rebase -i HEAD~3 &&\n'> <'\tgit rebase --continue &&\n'> <'\tcat >expected <<EOF &&\n'> 
          <'interactive rebase in progress; onto $ONTO\n'> <'Last commands done (2 commands done):\n'> <'   edit $COMMIT2 two_edits\n'> 
          <'   edit $COMMIT3 three_edits\n'> <'Next command to do (1 remaining command):\n'> <'   pick $COMMIT4 four_edits\n'> 
          <'  (use "git rebase --edit-todo" to view and edit)\n'> <'You are currently editing a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <several_edits>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (use "git commit --amend" to amend the current commit)\n'> 
          <'  (use "git rebase --continue" once you are satisfied with your changes)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status: (continue first edit) second edit and split'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard several_edits &&\n'> <'\tFAKE_LINES="edit 1 edit 2 3" &&\n'> 
          <'\texport FAKE_LINES &&\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> 
          <'\tCOMMIT2=$(git rev-parse --short several_edits^^) &&\n'> <'\tCOMMIT3=$(git rev-parse --short several_edits^) &&\n'> 
          <'\tCOMMIT4=$(git rev-parse --short several_edits) &&\n'> <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> <'\tgit rebase -i HEAD~3 &&\n'> 
          <'\tgit rebase --continue &&\n'> <'\tgit reset HEAD^ &&\n'> <'\tcat >expected <<EOF &&\n'> 
          <'interactive rebase in progress; onto $ONTO\n'> <'Last commands done (2 commands done):\n'> <'   edit $COMMIT2 two_edits\n'> 
          <'   edit $COMMIT3 three_edits\n'> <'Next command to do (1 remaining command):\n'> <'   pick $COMMIT4 four_edits\n'> 
          <'  (use "git rebase --edit-todo" to view and edit)\n'> <'You are currently splitting a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <several_edits>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (Once your working directory is clean, run "git rebase --continue")\n'> <'\n'> 
          <'Changes not staged for commit:\n'> <'  (use "git add <file>..." to update what will be committed)\n'> 
          <'  (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified:   main.txt\n'> <'\n'> 
          <'no changes added to commit (use "git add" and/or "git commit -a")\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status: (continue first edit) second edit and amend'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard several_edits &&\n'> <'\tFAKE_LINES="edit 1 edit 2 3" &&\n'> 
          <'\texport FAKE_LINES &&\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> 
          <'\tCOMMIT2=$(git rev-parse --short several_edits^^) &&\n'> <'\tCOMMIT3=$(git rev-parse --short several_edits^) &&\n'> 
          <'\tCOMMIT4=$(git rev-parse --short several_edits) &&\n'> <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> <'\tgit rebase -i HEAD~3 &&\n'> 
          <'\tgit rebase --continue &&\n'> <'\tgit commit --amend -m "foo" &&\n'> <'\tcat >expected <<EOF &&\n'> 
          <'interactive rebase in progress; onto $ONTO\n'> <'Last commands done (2 commands done):\n'> <'   edit $COMMIT2 two_edits\n'> 
          <'   edit $COMMIT3 three_edits\n'> <'Next command to do (1 remaining command):\n'> <'   pick $COMMIT4 four_edits\n'> 
          <'  (use "git rebase --edit-todo" to view and edit)\n'> <'You are currently editing a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <several_edits>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (use "git commit --amend" to amend the current commit)\n'> 
          <'  (use "git rebase --continue" once you are satisfied with your changes)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status: (amend first edit) second edit'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard several_edits &&\n'> <'\tFAKE_LINES="edit 1 edit 2 3" &&\n'> 
          <'\texport FAKE_LINES &&\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> 
          <'\tCOMMIT2=$(git rev-parse --short several_edits^^) &&\n'> <'\tCOMMIT3=$(git rev-parse --short several_edits^) &&\n'> 
          <'\tCOMMIT4=$(git rev-parse --short several_edits) &&\n'> <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> <'\tgit rebase -i HEAD~3 &&\n'> 
          <'\tgit commit --amend -m "a" &&\n'> <'\tgit rebase --continue &&\n'> <'\tcat >expected <<EOF &&\n'> 
          <'interactive rebase in progress; onto $ONTO\n'> <'Last commands done (2 commands done):\n'> <'   edit $COMMIT2 two_edits\n'> 
          <'   edit $COMMIT3 three_edits\n'> <'Next command to do (1 remaining command):\n'> <'   pick $COMMIT4 four_edits\n'> 
          <'  (use "git rebase --edit-todo" to view and edit)\n'> <'You are currently editing a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <several_edits>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (use "git commit --amend" to amend the current commit)\n'> 
          <'  (use "git rebase --continue" once you are satisfied with your changes)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status: (amend first edit) second edit and split'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard several_edits &&\n'> <'\tFAKE_LINES="edit 1 edit 2 3" &&\n'> 
          <'\texport FAKE_LINES &&\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> 
          <'\tCOMMIT2=$(git rev-parse --short several_edits^^) &&\n'> <'\tCOMMIT3=$(git rev-parse --short several_edits^) &&\n'> 
          <'\tCOMMIT4=$(git rev-parse --short several_edits) &&\n'> <'\tgit rebase -i HEAD~3 &&\n'> <'\tgit commit --amend -m "b" &&\n'> <'\tgit rebase --continue &&\n'> 
          <'\tgit reset HEAD^ &&\n'> <'\tcat >expected <<EOF &&\n'> <'interactive rebase in progress; onto $ONTO\n'> 
          <'Last commands done (2 commands done):\n'> <'   edit $COMMIT2 two_edits\n'> <'   edit $COMMIT3 three_edits\n'> 
          <'Next command to do (1 remaining command):\n'> <'   pick $COMMIT4 four_edits\n'> <'  (use "git rebase --edit-todo" to view and edit)\n'> 
          <'You are currently splitting a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <several_edits>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (Once your working directory is clean, run "git rebase --continue")\n'> <'\n'> 
          <'Changes not staged for commit:\n'> <'  (use "git add <file>..." to update what will be committed)\n'> 
          <'  (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified:   main.txt\n'> <'\n'> 
          <'no changes added to commit (use "git add" and/or "git commit -a")\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status: (amend first edit) second edit and amend'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard several_edits &&\n'> <'\tFAKE_LINES="edit 1 edit 2 3" &&\n'> 
          <'\texport FAKE_LINES &&\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> 
          <'\tCOMMIT2=$(git rev-parse --short several_edits^^) &&\n'> <'\tCOMMIT3=$(git rev-parse --short several_edits^) &&\n'> 
          <'\tCOMMIT4=$(git rev-parse --short several_edits) &&\n'> <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> <'\tgit rebase -i HEAD~3 &&\n'> 
          <'\tgit commit --amend -m "c" &&\n'> <'\tgit rebase --continue &&\n'> <'\tgit commit --amend -m "d" &&\n'> <'\tcat >expected <<EOF &&\n'> 
          <'interactive rebase in progress; onto $ONTO\n'> <'Last commands done (2 commands done):\n'> <'   edit $COMMIT2 two_edits\n'> 
          <'   edit $COMMIT3 three_edits\n'> <'Next command to do (1 remaining command):\n'> <'   pick $COMMIT4 four_edits\n'> 
          <'  (use "git rebase --edit-todo" to view and edit)\n'> <'You are currently editing a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <several_edits>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (use "git commit --amend" to amend the current commit)\n'> 
          <'  (use "git rebase --continue" once you are satisfied with your changes)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status: (split first edit) second edit'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard several_edits &&\n'> <'\tFAKE_LINES="edit 1 edit 2 3" &&\n'> 
          <'\texport FAKE_LINES &&\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> 
          <'\tCOMMIT2=$(git rev-parse --short several_edits^^) &&\n'> <'\tCOMMIT3=$(git rev-parse --short several_edits^) &&\n'> 
          <'\tCOMMIT4=$(git rev-parse --short several_edits) &&\n'> <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> <'\tgit rebase -i HEAD~3 &&\n'> 
          <'\tgit reset HEAD^ &&\n'> <'\tgit add main.txt &&\n'> <'\tgit commit -m "e" &&\n'> <'\tgit rebase --continue &&\n'> 
          <'\tcat >expected <<EOF &&\n'> <'interactive rebase in progress; onto $ONTO\n'> <'Last commands done (2 commands done):\n'> 
          <'   edit $COMMIT2 two_edits\n'> <'   edit $COMMIT3 three_edits\n'> <'Next command to do (1 remaining command):\n'> 
          <'   pick $COMMIT4 four_edits\n'> <'  (use "git rebase --edit-todo" to view and edit)\n'> 
          <'You are currently editing a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <several_edits>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (use "git commit --amend" to amend the current commit)\n'> 
          <'  (use "git rebase --continue" once you are satisfied with your changes)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status: (split first edit) second edit and split'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard several_edits &&\n'> <'\tFAKE_LINES="edit 1 edit 2 3" &&\n'> 
          <'\texport FAKE_LINES &&\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> 
          <'\tCOMMIT2=$(git rev-parse --short several_edits^^) &&\n'> <'\tCOMMIT3=$(git rev-parse --short several_edits^) &&\n'> 
          <'\tCOMMIT4=$(git rev-parse --short several_edits) &&\n'> <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> <'\tgit rebase -i HEAD~3 &&\n'> 
          <'\tgit reset HEAD^ &&\n'> <'\tgit add main.txt &&\n'> <'\tgit commit --amend -m "f" &&\n'> <'\tgit rebase --continue &&\n'> 
          <'\tgit reset HEAD^ &&\n'> <'\tcat >expected <<EOF &&\n'> <'interactive rebase in progress; onto $ONTO\n'> 
          <'Last commands done (2 commands done):\n'> <'   edit $COMMIT2 two_edits\n'> <'   edit $COMMIT3 three_edits\n'> 
          <'Next command to do (1 remaining command):\n'> <'   pick $COMMIT4 four_edits\n'> <'  (use "git rebase --edit-todo" to view and edit)\n'> 
          <'You are currently splitting a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <several_edits>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (Once your working directory is clean, run "git rebase --continue")\n'> <'\n'> 
          <'Changes not staged for commit:\n'> <'  (use "git add <file>..." to update what will be committed)\n'> 
          <'  (use "git checkout -- <file>..." to discard changes in working directory)\n'> <'\n'> <'\tmodified:   main.txt\n'> <'\n'> 
          <'no changes added to commit (use "git add" and/or "git commit -a")\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status: (split first edit) second edit and amend'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard several_edits &&\n'> <'\tFAKE_LINES="edit 1 edit 2 3" &&\n'> 
          <'\texport FAKE_LINES &&\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> 
          <'\tCOMMIT2=$(git rev-parse --short several_edits^^) &&\n'> <'\tCOMMIT3=$(git rev-parse --short several_edits^) &&\n'> 
          <'\tCOMMIT4=$(git rev-parse --short several_edits) &&\n'> <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> <'\tgit rebase -i HEAD~3 &&\n'> 
          <'\tgit reset HEAD^ &&\n'> <'\tgit add main.txt &&\n'> <'\tgit commit --amend -m "g" &&\n'> <'\tgit rebase --continue &&\n'> 
          <'\tgit commit --amend -m "h" &&\n'> <'\tcat >expected <<EOF &&\n'> <'interactive rebase in progress; onto $ONTO\n'> 
          <'Last commands done (2 commands done):\n'> <'   edit $COMMIT2 two_edits\n'> <'   edit $COMMIT3 three_edits\n'> 
          <'Next command to do (1 remaining command):\n'> <'   pick $COMMIT4 four_edits\n'> <'  (use "git rebase --edit-todo" to view and edit)\n'> 
          <'You are currently editing a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <several_edits>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (use "git commit --amend" to amend the current commit)\n'> 
          <'  (use "git rebase --continue" once you are satisfied with your changes)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'prepare am_session'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard master &&\n'> <'\tgit checkout -b am_session &&\n'> 
          <'\ttest_commit one_am one.txt "one" &&\n'> <'\ttest_commit two_am two.txt "two" &&\n'> <'\ttest_commit three_am three.txt "three"\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status in an am session: file already exists'>)} 
      {
        (SQ <'\n'> <'\tgit checkout -b am_already_exists &&\n'> 
          <'\ttest_when_finished "rm Maildir/* && git am --abort" &&\n'> <'\tgit format-patch -1 -oMaildir &&\n'> <'\ttest_must_fail git am Maildir/*.patch &&\n'> 
          <'\tcat >expected <<\\EOF &&\n'> <'On branch am_already_exists\n'> <'You are in the middle of an am session.\n'> 
          <'  (fix conflicts and then run "git am --continue")\n'> <'  (use "git am --skip" to skip this patch)\n'> 
          <'  (use "git am --abort" to restore the original branch)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status in an am session: file does not exist'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard am_session &&\n'> <'\tgit checkout -b am_not_exists &&\n'> 
          <'\tgit rm three.txt &&\n'> <'\tgit commit -m "delete three.txt" &&\n'> 
          <'\ttest_when_finished "rm Maildir/* && git am --abort" &&\n'> <'\tgit format-patch -1 -oMaildir &&\n'> <'\ttest_must_fail git am Maildir/*.patch &&\n'> 
          <'\tcat >expected <<\\EOF &&\n'> <'On branch am_not_exists\n'> <'You are in the middle of an am session.\n'> 
          <'  (fix conflicts and then run "git am --continue")\n'> <'  (use "git am --skip" to skip this patch)\n'> 
          <'  (use "git am --abort" to restore the original branch)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status in an am session: empty patch'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard am_session &&\n'> <'\tgit checkout -b am_empty &&\n'> 
          <'\ttest_when_finished "rm Maildir/* && git am --abort" &&\n'> <'\tgit format-patch -3 -oMaildir &&\n'> <'\tgit rm one.txt two.txt three.txt &&\n'> 
          <'\tgit commit -m "delete all am_empty" &&\n'> <'\techo error >Maildir/0002-two_am.patch &&\n'> <'\ttest_must_fail git am Maildir/*.patch &&\n'> 
          <'\tcat >expected <<\\EOF &&\n'> <'On branch am_empty\n'> <'You are in the middle of an am session.\n'> 
          <'The current patch is empty.\n'> <'  (use "git am --skip" to skip this patch)\n'> 
          <'  (use "git am --abort" to restore the original branch)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status when bisecting'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard master &&\n'> <'\tgit checkout -b bisect &&\n'> 
          <'\ttest_commit one_bisect main.txt one &&\n'> <'\ttest_commit two_bisect main.txt two &&\n'> <'\ttest_commit three_bisect main.txt three &&\n'> 
          <'\ttest_when_finished "git bisect reset" &&\n'> <'\tgit bisect start &&\n'> <'\tgit bisect bad &&\n'> <'\tgit bisect good one_bisect &&\n'> 
          <'\tTGT=$(git rev-parse --short two_bisect) &&\n'> <'\tcat >expected <<EOF &&\n'> <'HEAD detached at $TGT\n'> 
          <'You are currently bisecting, started from branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <bisect>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (use "git bisect reset" to get back to the original branch)\n'> <'\n'> 
          <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status when rebase conflicts with statushints disabled'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard master &&\n'> <'\tgit checkout -b statushints_disabled &&\n'> 
          <'\ttest_when_finished "git config --local advice.statushints true" &&\n'> <'\tgit config --local advice.statushints false &&\n'> 
          <'\ttest_commit one_statushints main.txt one &&\n'> <'\ttest_commit two_statushints main.txt two &&\n'> 
          <'\ttest_commit three_statushints main.txt three &&\n'> <'\ttest_when_finished "git rebase --abort" &&\n'> <'\tONTO=$(git rev-parse --short HEAD^^) &&\n'> 
          <'\ttest_must_fail git rebase HEAD^ --onto HEAD^^ &&\n'> <'\tcat >expected <<EOF &&\n'> <'rebase in progress; onto $ONTO\n'> 
          <'You are currently rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <statushints_disabled>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'\n'> <'Unmerged paths:\n'> <'\tboth modified:   main.txt\n'> <'\n'> 
          <'no changes added to commit\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'prepare for cherry-pick conflicts'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard master &&\n'> <'\tgit checkout -b cherry_branch &&\n'> 
          <'\ttest_commit one_cherry main.txt one &&\n'> <'\ttest_commit two_cherries main.txt two &&\n'> <'\tgit checkout -b cherry_branch_second &&\n'> 
          <'\ttest_commit second_cherry main.txt second &&\n'> <'\tgit checkout cherry_branch &&\n'> <'\ttest_commit three_cherries main.txt three\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status when cherry-picking before resolving conflicts'>)} 
      {
        (SQ <'\n'> <'\ttest_when_finished "git cherry-pick --abort" &&\n'> 
          <'\ttest_must_fail git cherry-pick cherry_branch_second &&\n'> <'\tTO_CHERRY_PICK=$(git rev-parse --short CHERRY_PICK_HEAD) &&\n'> <'\tcat >expected <<EOF &&\n'> 
          <'On branch cherry_branch\n'> <'You are currently cherry-picking commit $TO_CHERRY_PICK.\n'> 
          <'  (fix conflicts and run "git cherry-pick --continue")\n'> <'  (use "git cherry-pick --abort" to cancel the cherry-pick operation)\n'> <'\n'> 
          <'Unmerged paths:\n'> <'  (use "git add <file>..." to mark resolution)\n'> <'\n'> <'\tboth modified:   main.txt\n'> <'\n'> 
          <'no changes added to commit (use "git add" and/or "git commit -a")\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status when cherry-picking after resolving conflicts'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard cherry_branch &&\n'> 
          <'\ttest_when_finished "git cherry-pick --abort" &&\n'> <'\ttest_must_fail git cherry-pick cherry_branch_second &&\n'> 
          <'\tTO_CHERRY_PICK=$(git rev-parse --short CHERRY_PICK_HEAD) &&\n'> <'\techo end >main.txt &&\n'> <'\tgit add main.txt &&\n'> <'\tcat >expected <<EOF &&\n'> 
          <'On branch cherry_branch\n'> <'You are currently cherry-picking commit $TO_CHERRY_PICK.\n'> 
          <'  (all conflicts fixed: run "git cherry-pick --continue")\n'> <'  (use "git cherry-pick --abort" to cancel the cherry-pick operation)\n'> <'\n'> 
          <'Changes to be committed:\n'> <'\n'> <'\tmodified:   main.txt\n'> <'\n'> 
          <'Untracked files not listed (use -u option to show untracked files)\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status showing detached at and from a tag'>)} 
      {
        (SQ <'\n'> <'\ttest_commit atag tagging &&\n'> <'\tgit checkout atag &&\n'> 
          <'\tcat >expected <<\\EOF &&\n'> <'HEAD detached at atag\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual &&\n'> <'\n'> <'\tgit reset --hard HEAD^ &&\n'> 
          <'\tcat >expected <<\\EOF &&\n'> <'HEAD detached from atag\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status while reverting commit (conflicts)'>)} 
      {
        (SQ <'\n'> <'\tgit checkout master &&\n'> <'\techo before >to-revert.txt &&\n'> 
          <'\ttest_commit before to-revert.txt &&\n'> <'\techo old >to-revert.txt &&\n'> <'\ttest_commit old to-revert.txt &&\n'> 
          <'\techo new >to-revert.txt &&\n'> <'\ttest_commit new to-revert.txt &&\n'> <'\tTO_REVERT=$(git rev-parse --short HEAD^) &&\n'> 
          <'\ttest_must_fail git revert $TO_REVERT &&\n'> <'\tcat >expected <<EOF &&\n'> <'On branch master\n'> 
          <'You are currently reverting commit $TO_REVERT.\n'> <'  (fix conflicts and run "git revert --continue")\n'> 
          <'  (use "git revert --abort" to cancel the revert operation)\n'> <'\n'> <'Unmerged paths:\n'> <'  (use "git reset HEAD <file>..." to unstage)\n'> 
          <'  (use "git add <file>..." to mark resolution)\n'> <'\n'> <'\tboth modified:   to-revert.txt\n'> <'\n'> 
          <'no changes added to commit (use "git add" and/or "git commit -a")\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status while reverting commit (conflicts resolved)'>)} 
      {
        (SQ <'\n'> <'\techo reverted >to-revert.txt &&\n'> <'\tgit add to-revert.txt &&\n'> 
          <'\tcat >expected <<EOF &&\n'> <'On branch master\n'> <'You are currently reverting commit $TO_REVERT.\n'> 
          <'  (all conflicts fixed: run "git revert --continue")\n'> <'  (use "git revert --abort" to cancel the revert operation)\n'> <'\n'> <'Changes to be committed:\n'> 
          <'  (use "git reset HEAD <file>..." to unstage)\n'> <'\n'> <'\tmodified:   to-revert.txt\n'> <'\n'> 
          <'Untracked files not listed (use -u option to show untracked files)\n'> <'EOF\n'> <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status after reverting commit'>)} 
      {
        (SQ <'\n'> <'\tgit revert --continue &&\n'> <'\tcat >expected <<\\EOF &&\n'> 
          <'On branch master\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'prepare for different number of commits rebased'>)} 
      {
        (SQ <'\n'> <'\tgit reset --hard master &&\n'> <'\tgit checkout -b several_commits &&\n'> 
          <'\ttest_commit one_commit main.txt one &&\n'> <'\ttest_commit two_commit main.txt two &&\n'> <'\ttest_commit three_commit main.txt three &&\n'> 
          <'\ttest_commit four_commit main.txt four\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status: one command done nothing remaining'>)} 
      {
        (SQ <'\n'> <'\tFAKE_LINES="exec_exit_15" &&\n'> <'\texport FAKE_LINES &&\n'> 
          <'\ttest_when_finished "git rebase --abort" &&\n'> <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> <'\ttest_must_fail git rebase -i HEAD~3 &&\n'> 
          <'\tcat >expected <<EOF &&\n'> <'interactive rebase in progress; onto $ONTO\n'> <'Last command done (1 command done):\n'> 
          <'   exec exit 15\n'> <'No commands remaining.\n'> <'You are currently editing a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <several_commits>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (use "git commit --amend" to amend the current commit)\n'> 
          <'  (use "git rebase --continue" once you are satisfied with your changes)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} {(SQ <'status: two commands done with some white lines in done file'>)} 
      {
        (SQ <'\n'> <'\tFAKE_LINES="1 > exec_exit_15  2 3" &&\n'> <'\texport FAKE_LINES &&\n'> 
          <'\ttest_when_finished "git rebase --abort" &&\n'> <'\tONTO=$(git rev-parse --short HEAD~3) &&\n'> <'\tCOMMIT4=$(git rev-parse --short HEAD) &&\n'> 
          <'\tCOMMIT3=$(git rev-parse --short HEAD^) &&\n'> <'\tCOMMIT2=$(git rev-parse --short HEAD^^) &&\n'> <'\ttest_must_fail git rebase -i HEAD~3 &&\n'> 
          <'\tcat >expected <<EOF &&\n'> <'interactive rebase in progress; onto $ONTO\n'> <'Last commands done (2 commands done):\n'> 
          <'   pick $COMMIT2 two_commit\n'> <'   exec exit 15\n'> <'Next commands to do (2 remaining commands):\n'> 
          <'   pick $COMMIT3 three_commit\n'> <'   pick $COMMIT4 four_commit\n'> <'  (use "git rebase --edit-todo" to view and edit)\n'> 
          <'You are currently editing a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <several_commits>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (use "git commit --amend" to amend the current commit)\n'> 
          <'  (use "git rebase --continue" once you are satisfied with your changes)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_expect_success>} 
      {(SQ <'status: two remaining commands with some white lines in todo file'>)} 
      {
        (SQ <'\n'> <'\tFAKE_LINES="1 2 exec_exit_15 3 > 4" &&\n'> <'\texport FAKE_LINES &&\n'> 
          <'\ttest_when_finished "git rebase --abort" &&\n'> <'\tONTO=$(git rev-parse --short HEAD~4) &&\n'> <'\tCOMMIT4=$(git rev-parse --short HEAD) &&\n'> 
          <'\tCOMMIT3=$(git rev-parse --short HEAD^) &&\n'> <'\tCOMMIT2=$(git rev-parse --short HEAD^^) &&\n'> <'\ttest_must_fail git rebase -i HEAD~4 &&\n'> 
          <'\tcat >expected <<EOF &&\n'> <'interactive rebase in progress; onto $ONTO\n'> <'Last commands done (3 commands done):\n'> 
          <'   pick $COMMIT2 two_commit\n'> <'   exec exit 15\n'> <'  (see more in file .git/rebase-merge/done)\n'> 
          <'Next commands to do (2 remaining commands):\n'> <'   pick $COMMIT3 three_commit\n'> <'   pick $COMMIT4 four_commit\n'> 
          <'  (use "git rebase --edit-todo" to view and edit)\n'> <'You are currently editing a commit while rebasing branch '>
        ) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <several_commits>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <' on '>) (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) (SQ <'$ONTO'>) 
        (word_part.EscapedLiteral token:<Id.Lit_EscapedChar '\\\''>) 
        (SQ <'.\n'> <'  (use "git commit --amend" to amend the current commit)\n'> 
          <'  (use "git rebase --continue" once you are satisfied with your changes)\n'> <'\n'> <'nothing to commit (use -u to show untracked files)\n'> <'EOF\n'> 
          <'\tgit status --untracked-files=no >actual &&\n'> <'\ttest_i18ncmp expected actual\n'>
        )
      }
    )
    (C {<test_done>})
  ]
)