Re: [PATCH v2 1/3] avoid unnecessary worktrees traversing
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 19, 2023, 21:24 UTC
- Message-ID
- <xmqqilh21ale.fsf@gitster.g>
- In-Reply-To
- <bc82dd95-c968-146d-0dea-f82631b74765@gmail.com>
Rubén Justo <rjusto@gmail.com> writes:
> -static void reject_rebase_or_bisect_branch(const char *target) > +static int ishead_and_reject_rebase_or_bisect_branch(const char *target)
The original name was already horrible but it became much worse by acquiring a non-word "ishead" as part of it X-<.
At least let's replace "rebase or bisect" with something a bit more generic, extensible, and shorter phrase. For example, isn't the point of having the function was to give us a mechansim to see if the branch with the given name is not to be modified because it is being worked on elsewhere? "The branch is in use" would be a good phrase to express such a concept, so die_if_branch_is_in_use() or something along that line may be easier to grok.