Re: [PATCH 6/8] worktree: rename copy-pasted variable
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 10, 2020, 20:29 UTC
- Message-ID
- <xmqq7dt1pe8r.fsf@gitster.c.googlers.com>
- In-Reply-To
- <6d913ea3e0c30cc1dbcff05974b5d990797e8dc2.1599762679.git.martin.agren@gmail.com>
Martin Ågren <martin.agren@gmail.com> writes:
Show 9 quoted lines
> As the commit message of 04a3dfb8b5 ("worktree.c: check whether branch
> is bisected in another worktree", 2016-04-22) indicates, the function
> `is_worktree_being_bisected()` is based on the older function
> `is_worktree_being_rebased()`. This heritage can also be seen in the
> name of the variable where we store our return value: It was never
> adapted while copy-editing and remains as `found_rebase`.
>
> Rename the variable to make clear that we're looking for a bisect(ion),
> nothing else.How bad is this copy and paste? Is it a possibility to make a single helper function and these existing two a thin wrapper around the helper that passes customization between bisect and rebase?