Re: [PATCH v15 03/13] Treat BISECT_HEAD as a pseudo ref
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 28, 2020, 20:52 UTC
- Message-ID
- <xmqqd06n3hpx.fsf@gitster.c.googlers.com>
- In-Reply-To
- <60a82678a1b0b221b6d43434f70f9475a929d2a6.1590695210.git.gitgitgadget@gmail.com>
"Han-Wen Nienhuys via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 9 quoted lines
> From: Han-Wen Nienhuys <hanwen@google.com> > > Both the git-bisect.sh as bisect--helper inspected the file system directly. > > Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> > --- > builtin/bisect--helper.c | 3 +-- > git-bisect.sh | 4 ++-- > 2 files changed, 3 insertions(+), 4 deletions(-)
Makes sense.
A topic that adds more callers to the git_path_bisect_head() function has already been in flight for quite a while; I wonder if we can meet the topic in the middle. For example, would it have helped if we had a helper like this one:
static inline int bisect_head_exists(void) {
return ref_exists("BISECT_HEAD");
}on this side, and have the other side have something like:
static inline int bisect_head_exists(void) {
return file_exists(git_path_bisect_head());
}Then the caller(s) of bisect_head_exists() don't have to be changed at all.
Anyway, it's just a lesson that communication and collaboration between developers may help coming up with correct integration results.
Thanks. Queued.