From: Junio C Hamano Date: Thu, 10 Sep 2020 20:29:24 GMT Subject: Re: [PATCH 6/8] worktree: rename copy-pasted variable Message-ID: In-Reply-To: <6d913ea3e0c30cc1dbcff05974b5d990797e8dc2.1599762679.git.martin.agren@gmail.com> Martin Ă…gren writes: > 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?