summaryrefslogtreecommitdiffstats
path: root/git-bisect.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-31 13:25:53 -0700
committerJunio C Hamano <gitster@pobox.com>2014-10-31 13:25:53 -0700
commitc14e6ad9a230ad90c84b7f620d87fbe49a2d0342 (patch)
tree120346dc383e3d1c4219fe8c533eb22cb6af2b55 /git-bisect.html
parent2a4bcbc355496c8d83b1b9f8892c4cbe8f584158 (diff)
downloadgit-htmldocs-c14e6ad9a230ad90c84b7f620d87fbe49a2d0342.tar.gz
Autogenerated HTML docs for v2.2.0-rc0
Diffstat (limited to 'git-bisect.html')
-rw-r--r--git-bisect.html140
1 files changed, 69 insertions, 71 deletions
diff --git a/git-bisect.html b/git-bisect.html
index df7e27a9e..d91a5a153 100644
--- a/git-bisect.html
+++ b/git-bisect.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.6.6" />
+<meta name="generator" content="AsciiDoc 8.6.9" />
<title>git-bisect(1)</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
@@ -87,10 +87,16 @@ ul, ol, li > p {
ul > li { color: #aaa; }
ul > li > * { color: black; }
-pre {
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
padding: 0;
margin: 0;
}
+pre {
+ white-space: pre-wrap;
+}
#author {
color: #527bbd;
@@ -219,7 +225,7 @@ div.exampleblock > div.content {
}
div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
+span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
@@ -349,7 +355,7 @@ div.colist td img {
margin-bottom: 0.1em;
}
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
@@ -407,18 +413,14 @@ span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
+div.unbreakable { page-break-inside: avoid; }
+
/*
* xhtml11 specific
*
* */
-tt {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -452,12 +454,6 @@ div.tableblock > table[frame="vsides"] {
*
* */
-.monospaced {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -537,6 +533,8 @@ body.manpage div.sectionbody {
@media print {
body.manpage div#toc { display: none; }
}
+
+
</style>
<script type="text/javascript">
/*<![CDATA[*/
@@ -581,7 +579,7 @@ toc: function (toclevels) {
function tocEntries(el, toclevels) {
var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
@@ -610,7 +608,7 @@ toc: function (toclevels) {
var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
- if (entry.nodeName == 'div'
+ if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
@@ -656,7 +654,7 @@ footnotes: function () {
var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
- if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
@@ -762,7 +760,7 @@ git-bisect(1) Manual Page
on the subcommand:</p></div>
<div class="literalblock">
<div class="content">
-<pre><tt>git bisect help
+<pre><code>git bisect help
git bisect start [--no-checkout] [&lt;bad&gt; [&lt;good&gt;...]] [--] [&lt;paths&gt;...]
git bisect bad [&lt;rev&gt;]
git bisect good [&lt;rev&gt;...]
@@ -771,7 +769,7 @@ git bisect reset [&lt;commit&gt;]
git bisect visualize
git bisect replay &lt;logfile&gt;
git bisect log
-git bisect run &lt;cmd&gt;...</tt></pre>
+git bisect run &lt;cmd&gt;...</code></pre>
</div></div>
<div class="paragraph"><p>This command uses <em>git rev-list --bisect</em> to help drive the
binary search process to find which change introduced a bug, given an
@@ -787,29 +785,29 @@ help" or "git bisect -h" to get a long usage description.</p></div>
command is as follows:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect start
+<pre><code>$ git bisect start
$ git bisect bad # Current version is bad
$ git bisect good v2.6.13-rc2 # v2.6.13-rc2 was the last version
- # tested that was good</tt></pre>
+ # tested that was good</code></pre>
</div></div>
<div class="paragraph"><p>When you have specified at least one bad and one good version, the
command bisects the revision tree and outputs something similar to
the following:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>Bisecting: 675 revisions left to test after this</tt></pre>
+<pre><code>Bisecting: 675 revisions left to test after this</code></pre>
</div></div>
<div class="paragraph"><p>The state in the middle of the set of revisions is then checked out.
You would now compile that kernel and boot it. If the booted kernel
works correctly, you would then issue the following command:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect good # this one is good</tt></pre>
+<pre><code>$ git bisect good # this one is good</code></pre>
</div></div>
<div class="paragraph"><p>The output of this command would be something similar to the following:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>Bisecting: 337 revisions left to test after this</tt></pre>
+<pre><code>Bisecting: 337 revisions left to test after this</code></pre>
</div></div>
<div class="paragraph"><p>You keep repeating this process, compiling the tree, testing it, and
depending on whether it is good or bad issuing the command "git bisect good"
@@ -823,20 +821,20 @@ will have been left with the first bad kernel revision in "refs/bisect/bad".</p>
the original HEAD (i.e., to quit bisecting), issue the following command:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect reset</tt></pre>
+<pre><code>$ git bisect reset</code></pre>
</div></div>
<div class="paragraph"><p>By default, this will return your tree to the commit that was checked
-out before <tt>git bisect start</tt>. (A new <tt>git bisect start</tt> will also do
+out before <code>git bisect start</code>. (A new <code>git bisect start</code> will also do
that, as it cleans up the old bisection state.)</p></div>
<div class="paragraph"><p>With an optional argument, you can return to a different commit
instead:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect reset &lt;commit&gt;</tt></pre>
+<pre><code>$ git bisect reset &lt;commit&gt;</code></pre>
</div></div>
-<div class="paragraph"><p>For example, <tt>git bisect reset HEAD</tt> will leave you on the current
-bisection commit and avoid switching commits at all, while <tt>git bisect
-reset bisect/bad</tt> will check out the first bad revision.</p></div>
+<div class="paragraph"><p>For example, <code>git bisect reset HEAD</code> will leave you on the current
+bisection commit and avoid switching commits at all, while <code>git bisect
+reset bisect/bad</code> will check out the first bad revision.</p></div>
</div>
<div class="sect2">
<h3 id="_bisect_visualize">Bisect visualize</h3>
@@ -844,15 +842,15 @@ reset bisect/bad</tt> will check out the first bad revision.</p></div>
command during the bisection process:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect visualize</tt></pre>
+<pre><code>$ git bisect visualize</code></pre>
</div></div>
-<div class="paragraph"><p><tt>view</tt> may also be used as a synonym for <tt>visualize</tt>.</p></div>
+<div class="paragraph"><p><code>view</code> may also be used as a synonym for <code>visualize</code>.</p></div>
<div class="paragraph"><p>If the <em>DISPLAY</em> environment variable is not set, <em>git log</em> is used
-instead. You can also give command-line options such as <tt>-p</tt> and
-<tt>--stat</tt>.</p></div>
+instead. You can also give command-line options such as <code>-p</code> and
+<code>--stat</code>.</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect view --stat</tt></pre>
+<pre><code>$ git bisect view --stat</code></pre>
</div></div>
</div>
<div class="sect2">
@@ -861,7 +859,7 @@ instead. You can also give command-line options such as <tt>-p</tt> and
command to show what has been done so far:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect log</tt></pre>
+<pre><code>$ git bisect log</code></pre>
</div></div>
<div class="paragraph"><p>If you discover that you made a mistake in specifying the status of a
revision, you can save the output of this command to a file, edit it to
@@ -869,8 +867,8 @@ remove the incorrect entries, and then issue the following commands to
return to a corrected state:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect reset
-$ git bisect replay that-file</tt></pre>
+<pre><code>$ git bisect reset
+$ git bisect replay that-file</code></pre>
</div></div>
</div>
<div class="sect2">
@@ -883,11 +881,11 @@ want to find a nearby commit and try that instead.</p></div>
<div class="paragraph"><p>For example:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect good/bad # previous round was good or bad.
+<pre><code>$ git bisect good/bad # previous round was good or bad.
Bisecting: 337 revisions left to test after this
$ git bisect visualize # oops, that is uninteresting.
$ git reset --hard HEAD~3 # try 3 revisions before what
- # was suggested</tt></pre>
+ # was suggested</code></pre>
</div></div>
<div class="paragraph"><p>Then compile and test the chosen revision, and afterwards mark
the revision as good or bad in the usual manner.</p></div>
@@ -898,7 +896,7 @@ the revision as good or bad in the usual manner.</p></div>
to do it for you by issuing the command:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect skip # Current version cannot be tested</tt></pre>
+<pre><code>$ git bisect skip # Current version cannot be tested</code></pre>
</div></div>
<div class="paragraph"><p>But Git may eventually be unable to tell the first bad commit among
a bad commit and one or more skipped commits.</p></div>
@@ -906,36 +904,36 @@ a bad commit and one or more skipped commits.</p></div>
using the "<em>&lt;commit1&gt;</em>..<em>&lt;commit2&gt;</em>" notation. For example:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect skip v2.5..v2.6</tt></pre>
+<pre><code>$ git bisect skip v2.5..v2.6</code></pre>
</div></div>
-<div class="paragraph"><p>This tells the bisect process that no commit after <tt>v2.5</tt>, up to and
-including <tt>v2.6</tt>, should be tested.</p></div>
+<div class="paragraph"><p>This tells the bisect process that no commit after <code>v2.5</code>, up to and
+including <code>v2.6</code>, should be tested.</p></div>
<div class="paragraph"><p>Note that if you also want to skip the first commit of the range you
would issue the command:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect skip v2.5 v2.5..v2.6</tt></pre>
+<pre><code>$ git bisect skip v2.5 v2.5..v2.6</code></pre>
</div></div>
-<div class="paragraph"><p>This tells the bisect process that the commits between <tt>v2.5</tt> included
-and <tt>v2.6</tt> included should be skipped.</p></div>
+<div class="paragraph"><p>This tells the bisect process that the commits between <code>v2.5</code> included
+and <code>v2.6</code> included should be skipped.</p></div>
</div>
<div class="sect2">
<h3 id="_cutting_down_bisection_by_giving_more_parameters_to_bisect_start">Cutting down bisection by giving more parameters to bisect start</h3>
<div class="paragraph"><p>You can further cut down the number of trials, if you know what part of
the tree is involved in the problem you are tracking down, by specifying
-path parameters when issuing the <tt>bisect start</tt> command:</p></div>
+path parameters when issuing the <code>bisect start</code> command:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect start -- arch/i386 include/asm-i386</tt></pre>
+<pre><code>$ git bisect start -- arch/i386 include/asm-i386</code></pre>
</div></div>
<div class="paragraph"><p>If you know beforehand more than one good commit, you can narrow the
bisect space down by specifying all of the good commits immediately after
-the bad commit when issuing the <tt>bisect start</tt> command:</p></div>
+the bad commit when issuing the <code>bisect start</code> command:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect start v2.6.20-rc6 v2.6.20-rc4 v2.6.20-rc1 --
+<pre><code>$ git bisect start v2.6.20-rc6 v2.6.20-rc4 v2.6.20-rc1 --
# v2.6.20-rc6 is bad
- # v2.6.20-rc4 and v2.6.20-rc1 are good</tt></pre>
+ # v2.6.20-rc4 and v2.6.20-rc1 are good</code></pre>
</div></div>
</div>
<div class="sect2">
@@ -944,9 +942,9 @@ the bad commit when issuing the <tt>bisect start</tt> command:</p></div>
or bad, you can bisect by issuing the command:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect run my_script arguments</tt></pre>
+<pre><code>$ git bisect run my_script arguments</code></pre>
</div></div>
-<div class="paragraph"><p>Note that the script (<tt>my_script</tt> in the above example) should
+<div class="paragraph"><p>Note that the script (<code>my_script</code> in the above example) should
exit with code 0 if the current source code is good, and exit with a
code between 1 and 127 (inclusive), except 125, if the current
source code is bad.</p></div>
@@ -955,7 +953,7 @@ that a program that terminates via "exit(-1)" leaves $? = 255, (see the
exit(3) manual page), as the value is chopped with "&amp; 0377".</p></div>
<div class="paragraph"><p>The special exit code 125 should be used when the current source code
cannot be tested. If the script exits with this code, the current
-revision will be skipped (see <tt>git bisect skip</tt> above). 125 was chosen
+revision will be skipped (see <code>git bisect skip</code> above). 125 was chosen
as the highest sensible value to use for this purpose, because 126 and 127
are used by POSIX shells to signal specific error status (127 is for
command not found, 126 is for command found but not executable---these
@@ -989,7 +987,7 @@ process. Instead just update a special reference named <em>BISECT_HEAD</em> to m
it point to the commit that should be tested.</p></div>
<div class="paragraph"><p>This option may be useful when the test you would perform in each step
does not require a checked out tree.</p></div>
-<div class="paragraph"><p>If the repository is bare, <tt>--no-checkout</tt> is assumed.</p></div>
+<div class="paragraph"><p>If the repository is bare, <code>--no-checkout</code> is assumed.</p></div>
</dd>
</dl></div>
</div>
@@ -1004,9 +1002,9 @@ Automatically bisect a broken build between v1.2 and HEAD:
</p>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect start HEAD v1.2 -- # HEAD is bad, v1.2 is good
+<pre><code>$ git bisect start HEAD v1.2 -- # HEAD is bad, v1.2 is good
$ git bisect run make # "make" builds the app
-$ git bisect reset # quit the bisect session</tt></pre>
+$ git bisect reset # quit the bisect session</code></pre>
</div></div>
</li>
<li>
@@ -1015,9 +1013,9 @@ Automatically bisect a test failure between origin and HEAD:
</p>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect start HEAD origin -- # HEAD is bad, origin is good
+<pre><code>$ git bisect start HEAD origin -- # HEAD is bad, origin is good
$ git bisect run make test # "make test" builds and tests
-$ git bisect reset # quit the bisect session</tt></pre>
+$ git bisect reset # quit the bisect session</code></pre>
</div></div>
</li>
<li>
@@ -1026,13 +1024,13 @@ Automatically bisect a broken test case:
</p>
<div class="listingblock">
<div class="content">
-<pre><tt>$ cat ~/test.sh
+<pre><code>$ cat ~/test.sh
#!/bin/sh
make || exit 125 # this skips broken builds
~/check_test_case.sh # does the test case pass?
$ git bisect start HEAD HEAD~10 -- # culprit is among the last 10
$ git bisect run ~/test.sh
-$ git bisect reset # quit the bisect session</tt></pre>
+$ git bisect reset # quit the bisect session</code></pre>
</div></div>
<div class="paragraph"><p>Here we use a "test.sh" custom script. In this script, if "make"
fails, we skip the current commit.
@@ -1048,7 +1046,7 @@ Automatically bisect with temporary modifications (hot-fix):
</p>
<div class="listingblock">
<div class="content">
-<pre><tt>$ cat ~/test.sh
+<pre><code>$ cat ~/test.sh
#!/bin/sh
# tweak the working tree by merging the hot-fix branch
@@ -1068,14 +1066,14 @@ fi
git reset --hard
# return control
-exit $status</tt></pre>
+exit $status</code></pre>
</div></div>
<div class="paragraph"><p>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 <tt>git cherry-pick</tt> instead of <tt>git merge</tt>.)</p></div>
+use <code>git cherry-pick</code> instead of <code>git merge</code>.)</p></div>
</li>
<li>
<p>
@@ -1083,9 +1081,9 @@ Automatically bisect a broken test case:
</p>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect start HEAD HEAD~10 -- # culprit is among the last 10
+<pre><code>$ git bisect start HEAD HEAD~10 -- # culprit is among the last 10
$ git bisect run sh -c "make || exit 125; ~/check_test_case.sh"
-$ git bisect reset # quit the bisect session</tt></pre>
+$ git bisect reset # quit the bisect session</code></pre>
</div></div>
<div class="paragraph"><p>This shows that you can do without a run script if you write the test
on a single line.</p></div>
@@ -1096,7 +1094,7 @@ Locate a good region of the object graph in a damaged repository
</p>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git bisect start HEAD &lt;known-good-commit&gt; [ &lt;boundary-commit&gt; ... ] --no-checkout
+<pre><code>$ git bisect start HEAD &lt;known-good-commit&gt; [ &lt;boundary-commit&gt; ... ] --no-checkout
$ git bisect run sh -c '
GOOD=$(git for-each-ref "--format=%(objectname)" refs/bisect/good-*) &amp;&amp;
git rev-list --objects BISECT_HEAD --not $GOOD &gt;tmp.$$ &amp;&amp;
@@ -1105,7 +1103,7 @@ $ git bisect run sh -c '
rm -f tmp.$$
test $rc = 0'
-$ git bisect reset # quit the bisect session</tt></pre>
+$ git bisect reset # quit the bisect session</code></pre>
</div></div>
<div class="paragraph"><p>In this case, when <em>git bisect run</em> finishes, bisect/bad will refer to a commit that
has at least one parent whose reachable graph is fully traversable in the sense