status: rebase and merge can be in progress at the same time
Since `git rebase -r` was introduced, that is possible. But our machinery did not think that possible, and failed to say anything about the rebase in progress when in the middle of a merge. Let's work around that in the minimal fashion. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Nov 12, 2018 at 15:26 UTC
982288e9bda8ea8587b8afef63eb3424b047a018
1 file changed
+7
-2
wt-status.c
+7
-2
@@ -1559,6 +1559,7 @@ void wt_status_get_state(struct wt_status_state *state,
1559
struct object_id oid;
1560
1561
if (!stat(git_path_merge_head(the_repository), &st)) {
1562
+ wt_status_check_rebase(NULL, state);
1563
state->merge_in_progress = 1;
1564
} else if (wt_status_check_rebase(NULL, state)) {
1565
; /* all set */
@@ -1583,9 +1584,13 @@ static void wt_longstatus_print_state(struct wt_status *s)
1584
const char *state_color = color(WT_STATUS_HEADER, s);
1585
struct wt_status_state *state = &s->state;
1586
1586
- if (state->merge_in_progress)
1587
+ if (state->merge_in_progress) {
1588
+ if (state->rebase_interactive_in_progress) {
1589
+ show_rebase_information(s, state_color);
1590
+ fputs("\n", s->fp);
1591
+ }
1592
show_merge_in_progress(s, state_color);
1588
- else if (state->am_in_progress)
1593
+ } else if (state->am_in_progress)
1594
show_am_in_progress(s, state_color);
1595
else if (state->rebase_in_progress || state->rebase_interactive_in_progress)
1596
show_rebase_in_progress(s, state_color);