Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] bisect: use "$GIT_DIR/BISECT_START" to check if we are bisecting

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:39

Christian Couder [off-list ref] writes:
It seems simpler and safer to use the BISECT_START file everywhere
to decide if we are bisecting or not, instead of using it in some
places and BISECT_NAMES in other places.

In commit 6459c7c6786aa9bda0c7a095c9db66c36da0e5f0 (Nov 18 2007,
Bisect: use "$GIT_DIR/BISECT_NAMES" to check if we are bisecting.),
we decided to use BISECT_NAMES but code changed a lot and we now
have to check BISECT_START first in the "bisect_start" function
anyway.

This patch also makes things a little bit safer by creating
the BISECT_START file first and deleting it last, and also by
adding checks in "bisect_clean_state".

Signed-off-by: Christian Couder <redacted>
What's the breakage scenario that this patch fixes?
quoted hunk
diff --git a/git-bisect.sh b/git-bisect.sh
index 4bcbace..991b2ef 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -44,7 +44,7 @@ sq() {
 }
 
 bisect_autostart() {
-	test -f "$GIT_DIR/BISECT_NAMES" || {
+	test -s "$GIT_DIR/BISECT_START" || {
The reason you ignore an existing but empty BISECT_START file is...?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help