Skip to content

Commit 07a0e6f

Browse files
committed
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]>
1 parent eff1e59 commit 07a0e6f

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
@@ -1553,6 +1553,7 @@ void wt_status_get_state(struct wt_status_state *state,
15531553
struct object_id oid;
15541554

15551555
if (!stat(git_path_merge_head(the_repository), &st)) {
1556+
wt_status_check_rebase(NULL, state);
15561557
state->merge_in_progress = 1;
15571558
} else if (wt_status_check_rebase(NULL, state)) {
15581559
; /* all set */
@@ -1576,9 +1577,13 @@ static void wt_longstatus_print_state(struct wt_status *s,
15761577
struct wt_status_state *state)
15771578
{
15781579
const char *state_color = color(WT_STATUS_HEADER, s);
1579-
if (state->merge_in_progress)
1580+
if (state->merge_in_progress) {
1581+
if (state->rebase_interactive_in_progress) {
1582+
show_rebase_information(s, state, state_color);
1583+
fputs("\n", s->fp);
1584+
}
15801585
show_merge_in_progress(s, state, state_color);
1581-
else if (state->am_in_progress)
1586+
} else if (state->am_in_progress)
15821587
show_am_in_progress(s, state, state_color);
15831588
else if (state->rebase_in_progress || state->rebase_interactive_in_progress)
15841589
show_rebase_in_progress(s, state, state_color);

0 commit comments

Comments
 (0)