On Sat, 10 Sep 2005, Andrew Morton wrote:
Yup. Simply keeping a little log file would suffice.
This is a _very_ cheesy and untested patch.
Oh, btw, it also fixes "git bisect reset" - we used to remove the file
"refs/reads/bisect", not "refs/heads/bisect".
Cheesy, cheesy, cheesy,
Linus "not proud" Torvalds
---
Subject: Keep bisect event log
This keeps an event log in refs/bisect/log, which tracks what bisections
have been done. We could eventually have a "git bisect replay" or
somethign similar that actually uses it - for now we just have a command
to show the log: "git bisect log".
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
diff --git a/git-bisect.sh b/git-bisect.sh
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -8,7 +8,8 @@ git bisect bad [<rev>] mark <rev> a kno
git bisect good [<rev>...] mark <rev>... known-good revisions.
git bisect next find next bisection to test and check it out.
git bisect reset [<branch>] finish bisection search and go back to branch.
-git bisect visualize show bisect status in gitk.'
+git bisect visualize show bisect status in gitk.
+git bisect log show bisect log.'
exit 1
}
@@ -67,6 +68,7 @@ bisect_bad() {
usage ;;
esac || exit
echo "$rev" > "$GIT_DIR/refs/bisect/bad"
+ echo "bad $rev" >> "$GIT_DIR/refs/bisect/log"
bisect_auto_next
}
@@ -81,6 +83,7 @@ bisect_good() {
do
rev=$(git-rev-parse --verify "$rev") || exit
echo "$rev" >"$GIT_DIR/refs/bisect/good-$rev"
+ echo "good $rev" >> "$GIT_DIR/refs/bisect/log"
done
bisect_auto_next
}@@ -149,7 +152,11 @@ bisect_reset() {
esac
git checkout "$branch" &&
rm -fr "$GIT_DIR/refs/bisect"
- rm -f "$GIT_DIR/refs/reads/bisect"
+ rm -f "$GIT_DIR/refs/heads/bisect"
+}
+
+bisect_log() {
+ cat "$GIT_DIR/refs/bisect/log"
}
case "$#" in@@ -172,6 +179,8 @@ case "$#" in
bisect_visualize "$@" ;;
reset)
bisect_reset "$@" ;;
+ log)
+ bisect_log "$@" ;;
*)
usage ;;
esac