* [PATCH] Bisect: use "$GIT_DIR/BISECT_NAMES" to check if we are bisecting.
@ 2007-11-18 15:34 Christian Couder
0 siblings, 0 replies; only message in thread
From: Christian Couder @ 2007-11-18 15:34 UTC (permalink / raw)
To: Junio Hamano; +Cc: git
Previously we tested if the "$GIT_DIR/refs/bisect" directory
existed, to check if we were bisecting.
Now with packed refs, it is simpler to check if the file
"$GIT_DIR/BISECT_NAMES" exists, as it is already created when
starting bisection and removed when reseting bisection.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
git-bisect.sh | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/git-bisect.sh b/git-bisect.sh
index 4748c6a..01593eb 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -37,7 +37,7 @@ sq() {
}
bisect_autostart() {
- test -d "$GIT_DIR/refs/bisect" || {
+ test -f "$GIT_DIR/BISECT_NAMES" || {
echo >&2 'You need to start by "git bisect start"'
if test -t 0
then
@@ -83,7 +83,6 @@ bisect_start() {
# Get rid of any old bisect state
#
bisect_clean_state
- mkdir "$GIT_DIR/refs/bisect"
#
# Check for one bad and then some good revisions.
@@ -192,7 +191,7 @@ bisect_next_check() {
;;
*)
THEN=''
- test -d "$GIT_DIR/refs/bisect" || {
+ test -f "$GIT_DIR/BISECT_NAMES" || {
echo >&2 'You need to start by "git bisect start".'
THEN='then '
}
@@ -349,8 +348,6 @@ bisect_reset() {
}
bisect_clean_state() {
- rm -fr "$GIT_DIR/refs/bisect"
-
# There may be some refs packed during bisection.
git for-each-ref --format='%(refname) %(objectname)' refs/bisect/\* refs/heads/bisect |
while read ref hash
--
1.5.3.5.1815.g9445b-dirty
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-18 15:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-18 15:34 [PATCH] Bisect: use "$GIT_DIR/BISECT_NAMES" to check if we are bisecting Christian Couder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).