diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-02-09 01:22:04 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-02-09 01:22:04 +0100 |
commit | a593e2fbce8e66663b9e1f4f6377f2579879d1fd (patch) | |
tree | 00e826ff71ad957cbd67d0144adc25bf4190d4d6 /wt-status.c | |
parent | Merge branch 'sh/completion-with-reftable' into maint-2.43 (diff) | |
parent | status: fix branch shown when not only bisecting (diff) | |
download | git-a593e2fbce8e66663b9e1f4f6377f2579879d1fd.tar.xz git-a593e2fbce8e66663b9e1f4f6377f2579879d1fd.zip |
Merge branch 'rj/status-bisect-while-rebase' into maint-2.43
"git status" is taught to show both the branch being bisected and
being rebased when both are in effect at the same time.
cf. <xmqqil76kyov.fsf@gitster.g>
* rj/status-bisect-while-rebase:
status: fix branch shown when not only bisecting
Diffstat (limited to 'wt-status.c')
-rw-r--r-- | wt-status.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/wt-status.c b/wt-status.c index 9f45bf6949..9e8c08003b 100644 --- a/wt-status.c +++ b/wt-status.c @@ -861,6 +861,7 @@ void wt_status_state_free_buffers(struct wt_status_state *state) FREE_AND_NULL(state->branch); FREE_AND_NULL(state->onto); FREE_AND_NULL(state->detached_from); + FREE_AND_NULL(state->bisecting_from); } static void wt_longstatus_print_unmerged(struct wt_status *s) @@ -1569,10 +1570,10 @@ static void show_revert_in_progress(struct wt_status *s, static void show_bisect_in_progress(struct wt_status *s, const char *color) { - if (s->state.branch) + if (s->state.bisecting_from) status_printf_ln(s, color, _("You are currently bisecting, started from branch '%s'."), - s->state.branch); + s->state.bisecting_from); else status_printf_ln(s, color, _("You are currently bisecting.")); @@ -1733,7 +1734,7 @@ int wt_status_check_bisect(const struct worktree *wt, if (!stat(worktree_git_path(wt, "BISECT_LOG"), &st)) { state->bisect_in_progress = 1; - state->branch = get_branch(wt, "BISECT_START"); + state->bisecting_from = get_branch(wt, "BISECT_START"); return 1; } return 0; |