summaryrefslogtreecommitdiff
path: root/Documentation/git-bisect.txt
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2011-03-15 22:24:56 +0100
committerJunio C Hamano <gitster@pobox.com>2011-03-15 16:06:08 -0700
commite235b9168d8df2bc00ca2c77703ce1a98935c906 (patch)
treece14008a9fc26abbdd7977f5548f7fe95a06a340 /Documentation/git-bisect.txt
parent9d79b7e95d9acf07ff1479f41faa860503ce280e (diff)
downloadgit-e235b9168d8df2bc00ca2c77703ce1a98935c906.tar.gz
git-bisect.txt: example for bisecting with hot-fix
Give an example on how to bisect when older revisions need a hot-fix to build, run or test. Triggered by the binutils/kernel issue at http://thread.gmane.org/gmane.comp.gnu.binutils/52601/focus=1112779 Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-bisect.txt')
-rw-r--r--Documentation/git-bisect.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
index 47e8b1ed66..989e2238d6 100644
--- a/Documentation/git-bisect.txt
+++ b/Documentation/git-bisect.txt
@@ -294,6 +294,39 @@ It is safer if both "test.sh" and "check_test_case.sh" are
outside the repository to prevent interactions between the bisect,
make and test processes and the scripts.
+* Automatically bisect with temporary modifications (hot-fix):
++
+------------
+$ cat ~/test.sh
+#!/bin/sh
+
+# tweak the working tree by merging the hot-fix branch
+# and then attempt a build
+if git merge --no-commit hot-fix &&
+ make
+then
+ # run project specific test and report its status
+ ~/check_test_case.sh
+ status=$?
+else
+ # tell the caller this is untestable
+ status=125
+fi
+
+# undo the tweak to allow clean flipping to the next commit
+git reset --hard
+
+# return control
+exit $status
+------------
++
+This applies modifications from a hot-fix branch before each test run,
+e.g. in case your build or test environment changed so that older
+revisions may need a fix which newer ones have already. (Make sure the
+hot-fix branch is based off a commit which is contained in all revisions
+which you are bisecting, so that the merge does not pull in too much, or
+use `git cherry-pick` instead of `git merge`.)
+
* Automatically bisect a broken test case:
+
------------