Skip to content

Commit 982288e

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5aec927 commit 982288e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

wt-status.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,7 @@ void wt_status_get_state(struct wt_status_state *state,
15591559
struct object_id oid;
15601560

15611561
if (!stat(git_path_merge_head(the_repository), &st)) {
1562+
wt_status_check_rebase(NULL, state);
15621563
state->merge_in_progress = 1;
15631564
} else if (wt_status_check_rebase(NULL, state)) {
15641565
; /* all set */
@@ -1583,9 +1584,13 @@ static void wt_longstatus_print_state(struct wt_status *s)
15831584
const char *state_color = color(WT_STATUS_HEADER, s);
15841585
struct wt_status_state *state = &s->state;
15851586

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+
}
15871592
show_merge_in_progress(s, state_color);
1588-
else if (state->am_in_progress)
1593+
} else if (state->am_in_progress)
15891594
show_am_in_progress(s, state_color);
15901595
else if (state->rebase_in_progress || state->rebase_interactive_in_progress)
15911596
show_rebase_in_progress(s, state_color);

0 commit comments

Comments
 (0)