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>
Guillaume Pagès committed
Jun 30, 2015 at 15:01 UTC
df25e9475bbec86c5c8adaea1d515e7559607def
2 files changed
+18
-15
t/t7512-status-help.sh
+14
-14
@@ -136,7 +136,7 @@ test_expect_success 'status during rebase -i when conflicts unresolved' '
136
ONTO=$(git rev-parse --short rebase_i_conflicts) &&
137
test_must_fail git rebase -i rebase_i_conflicts &&
138
cat >expected <<EOF &&
139
-rebase in progress; onto $ONTO
139
+interactive rebase in progress; onto $ONTO
140
You are currently rebasing branch '\''rebase_i_conflicts_second'\'' on '\''$ONTO'\''.
141
(fix conflicts and then run "git rebase --continue")
142
(use "git rebase --skip" to skip this patch)
@@ -162,7 +162,7 @@ test_expect_success 'status during rebase -i after resolving conflicts' '
162
test_must_fail git rebase -i rebase_i_conflicts &&
163
git add main.txt &&
164
cat >expected <<EOF &&
165
-rebase in progress; onto $ONTO
165
+interactive rebase in progress; onto $ONTO
166
You are currently rebasing branch '\''rebase_i_conflicts_second'\'' on '\''$ONTO'\''.
167
(all conflicts fixed: run "git rebase --continue")
168
@@ -190,7 +190,7 @@ test_expect_success 'status when rebasing -i in edit mode' '
190
ONTO=$(git rev-parse --short HEAD~2) &&
191
git rebase -i HEAD~2 &&
192
cat >expected <<EOF &&
193
-rebase in progress; onto $ONTO
193
+interactive rebase in progress; onto $ONTO
194
You are currently editing a commit while rebasing branch '\''rebase_i_edit'\'' on '\''$ONTO'\''.
195
(use "git commit --amend" to amend the current commit)
196
(use "git rebase --continue" once you are satisfied with your changes)
@@ -216,7 +216,7 @@ test_expect_success 'status when splitting a commit' '
216
git rebase -i HEAD~3 &&
217
git reset HEAD^ &&
218
cat >expected <<EOF &&
219
-rebase in progress; onto $ONTO
219
+interactive rebase in progress; onto $ONTO
220
You are currently splitting a commit while rebasing branch '\''split_commit'\'' on '\''$ONTO'\''.
221
(Once your working directory is clean, run "git rebase --continue")
222
@@ -247,7 +247,7 @@ test_expect_success 'status after editing the last commit with --amend during a
247
git rebase -i HEAD~3 &&
248
git commit --amend -m "foo" &&
249
cat >expected <<EOF &&
250
-rebase in progress; onto $ONTO
250
+interactive rebase in progress; onto $ONTO
251
You are currently editing a commit while rebasing branch '\''amend_last'\'' on '\''$ONTO'\''.
252
(use "git commit --amend" to amend the current commit)
253
(use "git rebase --continue" once you are satisfied with your changes)
@@ -277,7 +277,7 @@ test_expect_success 'status: (continue first edit) second edit' '
277
git rebase -i HEAD~3 &&
278
git rebase --continue &&
279
cat >expected <<EOF &&
280
-rebase in progress; onto $ONTO
280
+interactive rebase in progress; onto $ONTO
281
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
282
(use "git commit --amend" to amend the current commit)
283
(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' '
299
git rebase --continue &&
300
git reset HEAD^ &&
301
cat >expected <<EOF &&
302
-rebase in progress; onto $ONTO
302
+interactive rebase in progress; onto $ONTO
303
You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
304
(Once your working directory is clean, run "git rebase --continue")
305
@@ -326,7 +326,7 @@ test_expect_success 'status: (continue first edit) second edit and amend' '
326
git rebase --continue &&
327
git commit --amend -m "foo" &&
328
cat >expected <<EOF &&
329
-rebase in progress; onto $ONTO
329
+interactive rebase in progress; onto $ONTO
330
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
331
(use "git commit --amend" to amend the current commit)
332
(use "git rebase --continue" once you are satisfied with your changes)
@@ -348,7 +348,7 @@ test_expect_success 'status: (amend first edit) second edit' '
348
git commit --amend -m "a" &&
349
git rebase --continue &&
350
cat >expected <<EOF &&
351
-rebase in progress; onto $ONTO
351
+interactive rebase in progress; onto $ONTO
352
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
353
(use "git commit --amend" to amend the current commit)
354
(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' '
371
git rebase --continue &&
372
git reset HEAD^ &&
373
cat >expected <<EOF &&
374
-rebase in progress; onto $ONTO
374
+interactive rebase in progress; onto $ONTO
375
You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
376
(Once your working directory is clean, run "git rebase --continue")
377
@@ -399,7 +399,7 @@ test_expect_success 'status: (amend first edit) second edit and amend' '
399
git rebase --continue &&
400
git commit --amend -m "d" &&
401
cat >expected <<EOF &&
402
-rebase in progress; onto $ONTO
402
+interactive rebase in progress; onto $ONTO
403
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
404
(use "git commit --amend" to amend the current commit)
405
(use "git rebase --continue" once you are satisfied with your changes)
@@ -423,7 +423,7 @@ test_expect_success 'status: (split first edit) second edit' '
423
git commit -m "e" &&
424
git rebase --continue &&
425
cat >expected <<EOF &&
426
-rebase in progress; onto $ONTO
426
+interactive rebase in progress; onto $ONTO
427
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
428
(use "git commit --amend" to amend the current commit)
429
(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' '
448
git rebase --continue &&
449
git reset HEAD^ &&
450
cat >expected <<EOF &&
451
-rebase in progress; onto $ONTO
451
+interactive rebase in progress; onto $ONTO
452
You are currently splitting a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
453
(Once your working directory is clean, run "git rebase --continue")
454
@@ -478,7 +478,7 @@ test_expect_success 'status: (split first edit) second edit and amend' '
478
git rebase --continue &&
479
git commit --amend -m "h" &&
480
cat >expected <<EOF &&
481
-rebase in progress; onto $ONTO
481
+interactive rebase in progress; onto $ONTO
482
You are currently editing a commit while rebasing branch '\''several_edits'\'' on '\''$ONTO'\''.
483
(use "git commit --amend" to amend the current commit)
484
(use "git rebase --continue" once you are satisfied with your changes)
wt-status.c
+4
-1
@@ -1327,7 +1327,10 @@ void wt_status_print(struct wt_status *s)
1327
else if (!strcmp(branch_name, "HEAD")) {
1328
branch_status_color = color(WT_STATUS_NOBRANCH, s);
1329
if (state.rebase_in_progress || state.rebase_interactive_in_progress) {
1330
- on_what = _("rebase in progress; onto ");
1330
+ if (state.rebase_interactive_in_progress)
1331
+ on_what = _("interactive rebase in progress; onto ");
1332
+ else
1333
+ on_what = _("rebase in progress; onto ");
1334
branch_name = state.onto;
1335
} else if (state.detached_from) {
1336
branch_name = state.detached_from;