@matheusbsbs / matheus-bagliano / commits / cc65343a84
Fork 0

Bisect: convert revs given to good and bad to commits

Without this the rev could be (e.g.) a tag and then the condition to end the bisect might fail and you have to check the already known to be bad revision once more. Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Junio C Hamano <junkio@cox.net>

Uwe Kleine-König committed Mar 22, 2007 at 17:18 UTC cc65343a8436896f4c78f5f802595870784df454
1 file changed +2 -2
git-bisect.sh
+2 -2
@@ -85,7 +85,7 @@ bisect_bad() {
85 0)
86 rev=$(git-rev-parse --verify HEAD) ;;
87 1)
88 - rev=$(git-rev-parse --verify "$1") ;;
88 + rev=$(git-rev-parse --verify "$1^{commit}") ;;
89 *)
90 usage ;;
91 esac || exit
@@ -104,7 +104,7 @@ bisect_good() {
104 esac
105 for rev in $revs
106 do
107 - rev=$(git-rev-parse --verify "$rev") || exit
107 + rev=$(git-rev-parse --verify "$rev^{commit}") || exit
108 echo "$rev" >"$GIT_DIR/refs/bisect/good-$rev"
109 echo "# good: "$(git-show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
110 echo "git-bisect good $rev" >>"$GIT_DIR/BISECT_LOG"