Thread View: linux.kernel.git
1 messages
1 total messages
Started by Junio C Hamano
Fri, 13 Nov 2026 18:59
Re: [PATCH v5 3/5] ref-filter: name the worktree of a branch being rebased or bisected
Author: Junio C Hamano
Date: Fri, 13 Nov 2026 18:59
Date: Fri, 13 Nov 2026 18:59
28 lines
13823 bytes
13823 bytes
Jasper Mayone <me@jaspermayone.com> writes:
> branch.c already knows the answer, as prepare_checked_out_branches()
> records the branch that each worktree has checked out, is rebasing or
> is bisecting. Record those branches in a map as well, add
> branch_checked_out_worktree() to look a branch up in it, and use that
> for %(worktreepath) in place of the map that ref-filter.c builds from
> the HEAD of each worktree.
> ..
> Documentation/git-branch.adoc | 6 ++-
> Documentation/git-for-each-ref.adoc | 5 +-
> branch.c | 10 ++++
> branch.h | 9 ++++
> ref-filter.c | 74 ++--------------------------
Nice loss of duplicated logic.
> +const char *branch_checked_out_worktree(const char *refname)
> +{
> + prepare_checked_out_branches();
> + return strmap_get(&checked_out_worktrees, refname);
> +}
Yes, this is related to what I asked while reading [1/5]. Doesn't
what the prepare_checked_out_branches() function in branch.c knows
overlap with the new function added there, and shouldn't we look
into reusing it in the new code path if it is the case?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads