{"thread":{"id":"10918","subject":"[PATCH] Bisect: use \"$GIT_DIR/BISECT_NAMES\" to check if we are bisecting.","startedAt":"2007-11-18T15:34:03Z","lastAt":"2007-11-18T15:34:03Z","messageCount":1,"participants":["Christian Couder"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"60235","messageId":"20071118163403.a6238371.chriscool@tuxfamily.org","threadId":"10918","inReplyTo":null,"subject":"[PATCH] Bisect: use \"$GIT_DIR/BISECT_NAMES\" to check if we are bisecting.","fromName":"Christian Couder","fromEmail":"chriscool@tuxfamily.org","sentAt":"2007-11-18T15:34:03Z","receivedAt":"2007-11-18T15:34:03Z","isPatch":true,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Previously we tested if the \"$GIT_DIR/refs/bisect\" directory\nexisted, to check if we were bisecting.\n\nNow with packed refs, it is simpler to check if the file\n\"$GIT_DIR/BISECT_NAMES\" exists, as it is already created when\nstarting bisection and removed when reseting bisection.\n\nSigned-off-by: Christian Couder <chriscool@tuxfamily.org>\n---\n git-bisect.sh |    7 ++-----\n 1 files changed, 2 insertions(+), 5 deletions(-)\n\ndiff --git a/git-bisect.sh b/git-bisect.sh\nindex 4748c6a..01593eb 100755\n--- a/git-bisect.sh\n+++ b/git-bisect.sh\n@@ -37,7 +37,7 @@ sq() {\n }\n \n bisect_autostart() {\n-\ttest -d \"$GIT_DIR/refs/bisect\" || {\n+\ttest -f \"$GIT_DIR/BISECT_NAMES\" || {\n \t\techo >&2 'You need to start by \"git bisect start\"'\n \t\tif test -t 0\n \t\tthen\n@@ -83,7 +83,6 @@ bisect_start() {\n \t# Get rid of any old bisect state\n \t#\n \tbisect_clean_state\n-\tmkdir \"$GIT_DIR/refs/bisect\"\n \n \t#\n \t# Check for one bad and then some good revisions.\n@@ -192,7 +191,7 @@ bisect_next_check() {\n \t\t;;\n \t*)\n \t\tTHEN=''\n-\t\ttest -d \"$GIT_DIR/refs/bisect\" || {\n+\t\ttest -f \"$GIT_DIR/BISECT_NAMES\" || {\n \t\t\techo >&2 'You need to start by \"git bisect start\".'\n \t\t\tTHEN='then '\n \t\t}\n@@ -349,8 +348,6 @@ bisect_reset() {\n }\n \n bisect_clean_state() {\n-\trm -fr \"$GIT_DIR/refs/bisect\"\n-\n \t# There may be some refs packed during bisection.\n \tgit for-each-ref --format='%(refname) %(objectname)' refs/bisect/\\* refs/heads/bisect |\n \twhile read ref hash\n-- \n1.5.3.5.1815.g9445b-dirty\n"}]}