status: differentiate interactive from non-interactive rebases
Signed-off-by: Guillaume Pagès <guillaume.pages@ensimag.grenoble-inp.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
05eb563553
commit
df25e9475b
@ -136,7 +136,7 @@ test_expect_success 'status during rebase -i when conflicts unresolved' '
|
|||||||
ONTO=$(git rev-parse --short rebase_i_conflicts) &&
|
ONTO=$(git rev-parse --short rebase_i_conflicts) &&
|
||||||
test_must_fail git rebase -i rebase_i_conflicts &&
|
test_must_fail git rebase -i rebase_i_conflicts &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently rebasing branch '\''rebase_i_conflicts_second'\'' on '\''$ONTO'\''.
|
You are currently rebasing branch '\''rebase_i_conflicts_second'\'' on '\''$ONTO'\''.
|
||||||
(fix conflicts and then run "git rebase --continue")
|
(fix conflicts and then run "git rebase --continue")
|
||||||
(use "git rebase --skip" to skip this patch)
|
(use "git rebase --skip" to skip this patch)
|
||||||
@ -162,7 +162,7 @@ test_expect_success 'status during rebase -i after resolving conflicts' '
|
|||||||
test_must_fail git rebase -i rebase_i_conflicts &&
|
test_must_fail git rebase -i rebase_i_conflicts &&
|
||||||
git add main.txt &&
|
git add main.txt &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently rebasing branch '\''rebase_i_conflicts_second'\'' on '\''$ONTO'\''.
|
You are currently rebasing branch '\''rebase_i_conflicts_second'\'' on '\''$ONTO'\''.
|
||||||
(all conflicts fixed: run "git rebase --continue")
|
(all conflicts fixed: run "git rebase --continue")
|
||||||
|
|
||||||
@ -190,7 +190,7 @@ test_expect_success 'status when rebasing -i in edit mode' '
|
|||||||
ONTO=$(git rev-parse --short HEAD~2) &&
|
ONTO=$(git rev-parse --short HEAD~2) &&
|
||||||
git rebase -i HEAD~2 &&
|
git rebase -i HEAD~2 &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently editing a commit while rebasing branch '\''rebase_i_edit'\'' on '\''$ONTO'\''.
|
You are currently editing a commit while rebasing branch '\''rebase_i_edit'\'' on '\''$ONTO'\''.
|
||||||
(use "git commit --amend" to amend the current commit)
|
(use "git commit --amend" to amend the current commit)
|
||||||
(use "git rebase --continue" once you are satisfied with your changes)
|
(use "git rebase --continue" once you are satisfied with your changes)
|
||||||
@ -216,7 +216,7 @@ test_expect_success 'status when splitting a commit' '
|
|||||||
git rebase -i HEAD~3 &&
|
git rebase -i HEAD~3 &&
|
||||||
git reset HEAD^ &&
|
git reset HEAD^ &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently splitting a commit while rebasing branch '\''split_commit'\'' on '\''$ONTO'\''.
|
You are currently splitting a commit while rebasing branch '\''split_commit'\'' on '\''$ONTO'\''.
|
||||||
(Once your working directory is clean, run "git rebase --continue")
|
(Once your working directory is clean, run "git rebase --continue")
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ test_expect_success 'status after editing the last commit with --amend during a
|
|||||||
git rebase -i HEAD~3 &&
|
git rebase -i HEAD~3 &&
|
||||||
git commit --amend -m "foo" &&
|
git commit --amend -m "foo" &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently editing a commit while rebasing branch '\''amend_last'\'' on '\''$ONTO'\''.
|
You are currently editing a commit while rebasing branch '\''amend_last'\'' on '\''$ONTO'\''.
|
||||||
(use "git commit --amend" to amend the current commit)
|
(use "git commit --amend" to amend the current commit)
|
||||||
(use "git rebase --continue" once you are satisfied with your changes)
|
(use "git rebase --continue" once you are satisfied with your changes)
|
||||||
@ -277,7 +277,7 @@ test_expect_success 'status: (continue first edit) second edit' '
|
|||||||
git rebase -i HEAD~3 &&
|
git rebase -i HEAD~3 &&
|
||||||
git rebase --continue &&
|
git rebase --continue &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
||||||
(use "git commit --amend" to amend the current commit)
|
(use "git commit --amend" to amend the current commit)
|
||||||
(use "git rebase --continue" once you are satisfied with your changes)
|
(use "git rebase --continue" once you are satisfied with your changes)
|
||||||
@ -299,7 +299,7 @@ test_expect_success 'status: (continue first edit) second edit and split' '
|
|||||||
git rebase --continue &&
|
git rebase --continue &&
|
||||||
git reset HEAD^ &&
|
git reset HEAD^ &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
||||||
(Once your working directory is clean, run "git rebase --continue")
|
(Once your working directory is clean, run "git rebase --continue")
|
||||||
|
|
||||||
@ -326,7 +326,7 @@ test_expect_success 'status: (continue first edit) second edit and amend' '
|
|||||||
git rebase --continue &&
|
git rebase --continue &&
|
||||||
git commit --amend -m "foo" &&
|
git commit --amend -m "foo" &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
||||||
(use "git commit --amend" to amend the current commit)
|
(use "git commit --amend" to amend the current commit)
|
||||||
(use "git rebase --continue" once you are satisfied with your changes)
|
(use "git rebase --continue" once you are satisfied with your changes)
|
||||||
@ -348,7 +348,7 @@ test_expect_success 'status: (amend first edit) second edit' '
|
|||||||
git commit --amend -m "a" &&
|
git commit --amend -m "a" &&
|
||||||
git rebase --continue &&
|
git rebase --continue &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
||||||
(use "git commit --amend" to amend the current commit)
|
(use "git commit --amend" to amend the current commit)
|
||||||
(use "git rebase --continue" once you are satisfied with your changes)
|
(use "git rebase --continue" once you are satisfied with your changes)
|
||||||
@ -371,7 +371,7 @@ test_expect_success 'status: (amend first edit) second edit and split' '
|
|||||||
git rebase --continue &&
|
git rebase --continue &&
|
||||||
git reset HEAD^ &&
|
git reset HEAD^ &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
||||||
(Once your working directory is clean, run "git rebase --continue")
|
(Once your working directory is clean, run "git rebase --continue")
|
||||||
|
|
||||||
@ -399,7 +399,7 @@ test_expect_success 'status: (amend first edit) second edit and amend' '
|
|||||||
git rebase --continue &&
|
git rebase --continue &&
|
||||||
git commit --amend -m "d" &&
|
git commit --amend -m "d" &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
||||||
(use "git commit --amend" to amend the current commit)
|
(use "git commit --amend" to amend the current commit)
|
||||||
(use "git rebase --continue" once you are satisfied with your changes)
|
(use "git rebase --continue" once you are satisfied with your changes)
|
||||||
@ -423,7 +423,7 @@ test_expect_success 'status: (split first edit) second edit' '
|
|||||||
git commit -m "e" &&
|
git commit -m "e" &&
|
||||||
git rebase --continue &&
|
git rebase --continue &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
||||||
(use "git commit --amend" to amend the current commit)
|
(use "git commit --amend" to amend the current commit)
|
||||||
(use "git rebase --continue" once you are satisfied with your changes)
|
(use "git rebase --continue" once you are satisfied with your changes)
|
||||||
@ -448,7 +448,7 @@ test_expect_success 'status: (split first edit) second edit and split' '
|
|||||||
git rebase --continue &&
|
git rebase --continue &&
|
||||||
git reset HEAD^ &&
|
git reset HEAD^ &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
||||||
(Once your working directory is clean, run "git rebase --continue")
|
(Once your working directory is clean, run "git rebase --continue")
|
||||||
|
|
||||||
@ -478,7 +478,7 @@ test_expect_success 'status: (split first edit) second edit and amend' '
|
|||||||
git rebase --continue &&
|
git rebase --continue &&
|
||||||
git commit --amend -m "h" &&
|
git commit --amend -m "h" &&
|
||||||
cat >expected <<EOF &&
|
cat >expected <<EOF &&
|
||||||
rebase in progress; onto $ONTO
|
interactive rebase in progress; onto $ONTO
|
||||||
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
|
||||||
(use "git commit --amend" to amend the current commit)
|
(use "git commit --amend" to amend the current commit)
|
||||||
(use "git rebase --continue" once you are satisfied with your changes)
|
(use "git rebase --continue" once you are satisfied with your changes)
|
||||||
|
@ -1327,7 +1327,10 @@ void wt_status_print(struct wt_status *s)
|
|||||||
else if (!strcmp(branch_name, "HEAD")) {
|
else if (!strcmp(branch_name, "HEAD")) {
|
||||||
branch_status_color = color(WT_STATUS_NOBRANCH, s);
|
branch_status_color = color(WT_STATUS_NOBRANCH, s);
|
||||||
if (state.rebase_in_progress || state.rebase_interactive_in_progress) {
|
if (state.rebase_in_progress || state.rebase_interactive_in_progress) {
|
||||||
on_what = _("rebase in progress; onto ");
|
if (state.rebase_interactive_in_progress)
|
||||||
|
on_what = _("interactive rebase in progress; onto ");
|
||||||
|
else
|
||||||
|
on_what = _("rebase in progress; onto ");
|
||||||
branch_name = state.onto;
|
branch_name = state.onto;
|
||||||
} else if (state.detached_from) {
|
} else if (state.detached_from) {
|
||||||
branch_name = state.detached_from;
|
branch_name = state.detached_from;
|
||||||
|
Reference in New Issue
Block a user