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>maint
parent
3007a78033
commit
cc65343a84
|
@ -85,7 +85,7 @@ bisect_bad() {
|
||||||
0)
|
0)
|
||||||
rev=$(git-rev-parse --verify HEAD) ;;
|
rev=$(git-rev-parse --verify HEAD) ;;
|
||||||
1)
|
1)
|
||||||
rev=$(git-rev-parse --verify "$1") ;;
|
rev=$(git-rev-parse --verify "$1^{commit}") ;;
|
||||||
*)
|
*)
|
||||||
usage ;;
|
usage ;;
|
||||||
esac || exit
|
esac || exit
|
||||||
|
@ -104,7 +104,7 @@ bisect_good() {
|
||||||
esac
|
esac
|
||||||
for rev in $revs
|
for rev in $revs
|
||||||
do
|
do
|
||||||
rev=$(git-rev-parse --verify "$rev") || exit
|
rev=$(git-rev-parse --verify "$rev^{commit}") || exit
|
||||||
echo "$rev" >"$GIT_DIR/refs/bisect/good-$rev"
|
echo "$rev" >"$GIT_DIR/refs/bisect/good-$rev"
|
||||||
echo "# good: "$(git-show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
|
echo "# good: "$(git-show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
|
||||||
echo "git-bisect good $rev" >>"$GIT_DIR/BISECT_LOG"
|
echo "git-bisect good $rev" >>"$GIT_DIR/BISECT_LOG"
|
||||||
|
|
Loading…
Reference in New Issue