Re: [PATCH] bisect: use "$GIT_DIR/BISECT_START" to check if we are bisecting
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 29, 2008, 04:28 UTC
- Message-ID
- <7vd4n5raxj.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <200805290601.19067.chriscool@tuxfamily.org>
Christian Couder <chriscool@tuxfamily.org> writes:
Show 8 quoted lines
>> The reason you ignore an existing but empty BISECT_START file is...? > > ... that it should not happen, because this file is only written > in "bisect_start" and there its content comes either from the current HEAD > or from a previous not empty BISECT_START file. > > We might add a check for an empty BISECT_START file and warn in this case > that the file may have been corrupted, but that may be for another patch.
My question was more about "why are you acting as if distinction between empty and nonempty BISECT_START matters?"
Because you "echo $start_head >$GIT_DIR/BISECT_START", this file will always at least have a terminating LF even when the head is detached. IOW, if it exists, it will never be empty, I think.