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>maint
parent
5aec9271d3
commit
982288e9bd
|
@ -1559,6 +1559,7 @@ void wt_status_get_state(struct wt_status_state *state,
|
||||||
struct object_id oid;
|
struct object_id oid;
|
||||||
|
|
||||||
if (!stat(git_path_merge_head(the_repository), &st)) {
|
if (!stat(git_path_merge_head(the_repository), &st)) {
|
||||||
|
wt_status_check_rebase(NULL, state);
|
||||||
state->merge_in_progress = 1;
|
state->merge_in_progress = 1;
|
||||||
} else if (wt_status_check_rebase(NULL, state)) {
|
} else if (wt_status_check_rebase(NULL, state)) {
|
||||||
; /* all set */
|
; /* all set */
|
||||||
|
@ -1583,9 +1584,13 @@ static void wt_longstatus_print_state(struct wt_status *s)
|
||||||
const char *state_color = color(WT_STATUS_HEADER, s);
|
const char *state_color = color(WT_STATUS_HEADER, s);
|
||||||
struct wt_status_state *state = &s->state;
|
struct wt_status_state *state = &s->state;
|
||||||
|
|
||||||
if (state->merge_in_progress)
|
if (state->merge_in_progress) {
|
||||||
|
if (state->rebase_interactive_in_progress) {
|
||||||
|
show_rebase_information(s, state_color);
|
||||||
|
fputs("\n", s->fp);
|
||||||
|
}
|
||||||
show_merge_in_progress(s, state_color);
|
show_merge_in_progress(s, state_color);
|
||||||
else if (state->am_in_progress)
|
} else if (state->am_in_progress)
|
||||||
show_am_in_progress(s, state_color);
|
show_am_in_progress(s, state_color);
|
||||||
else if (state->rebase_in_progress || state->rebase_interactive_in_progress)
|
else if (state->rebase_in_progress || state->rebase_interactive_in_progress)
|
||||||
show_rebase_in_progress(s, state_color);
|
show_rebase_in_progress(s, state_color);
|
||||||
|
|
Loading…
Reference in New Issue