aboutsummaryrefslogtreecommitdiffstats
path: root/wt-status.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-02-08 16:22:04 -0800
committerJunio C Hamano <gitster@pobox.com>2024-02-08 16:22:04 -0800
commita593e2fbce8e66663b9e1f4f6377f2579879d1fd (patch)
tree00e826ff71ad957cbd67d0144adc25bf4190d4d6 /wt-status.c
parent8f7cc565e002450e8e2d3404e227cdce5555cb2d (diff)
parent990adccbdf0d8d1056c49a5ed546e744f542ba8f (diff)
downloadgit-a593e2fbce8e66663b9e1f4f6377f2579879d1fd.tar.gz
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.c7
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;