diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-01-02 13:51:29 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-01-02 13:51:29 -0800 |
commit | cce4778520b6ade4bc839fe054500253f7d22570 (patch) | |
tree | 56e9458171772e6730ec578d8c237ab034284218 /wt-status.c | |
parent | 59a29e1274948bf9a3ef44c65903d09194464e1c (diff) | |
parent | 990adccbdf0d8d1056c49a5ed546e744f542ba8f (diff) | |
download | git-cce4778520b6ade4bc839fe054500253f7d22570.tar.gz |
Merge branch 'rj/status-bisect-while-rebase'
"git status" is taught to show both the branch being bisected and
being rebased when both are in effect at the same time.
* 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; |