Signed-off-by: Louis Stuber <stub...@ensimag.grenoble-inp.fr>
Signed-off-by: Antoine Delaite <antoine.dela...@ensimag.grenoble-inp.fr>
---
 git-bisect.sh |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/git-bisect.sh b/git-bisect.sh
index 109bd65..d3d19cb 100644
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -183,6 +183,10 @@ bisect_start() {
        then
                echo "$BISECT_BAD" >"$GIT_DIR/BISECT_TERMS" &&
                echo "$BISECT_GOOD" >>"$GIT_DIR/BISECT_TERMS"
+               if test "$BISECT_BAD" = "new"
+               then
+                       echo "" > "$GIT_DIR/BISECT_OLDNEWMODE"
+               fi
        fi &&
        echo "git bisect start$orig_args" >>"$GIT_DIR/BISECT_LOG" || exit
        #
@@ -416,6 +420,7 @@ bisect_clean_state() {
        rm -f "$GIT_DIR/BISECT_NAMES" &&
        rm -f "$GIT_DIR/BISECT_RUN" &&
        rm -f "$GIT_DIR/BISECT_TERMS" &&
+       rm -f "$GIT_DIR/BISECT_OLDNEWMODE" &&
        # Cleanup head-name if it got left by an old version of git-bisect
        rm -f "$GIT_DIR/head-name" &&
        git update-ref -d --no-deref BISECT_HEAD &&
@@ -544,7 +549,8 @@ check_and_set_terms () {
                        if test ! -s "$GIT_DIR/BISECT_TERMS"
                        then
                                echo "new" >"$GIT_DIR/BISECT_TERMS" &&
-                               echo "old" >>"$GIT_DIR/BISECT_TERMS"
+                               echo "old" >>"$GIT_DIR/BISECT_TERMS" &&
+                               echo "" > "$GIT_DIR/BISECT_OLDNEWMODE"
                        fi
                        BISECT_BAD="new"
                        BISECT_GOOD="old" ;;
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to