<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/git-bisect.sh, branch v1.6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.6.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2009-04-12T23:46:40Z</updated>
<entry>
<title>Merge branch 'cc/bisect-filter'</title>
<updated>2009-04-12T23:46:40Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-04-12T23:46:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e353a5e5de9da021c7c6c0bc2dc5f95a39900a1'/>
<id>urn:sha1:6e353a5e5de9da021c7c6c0bc2dc5f95a39900a1</id>
<content type='text'>
* cc/bisect-filter: (21 commits)
  rev-list: add "int bisect_show_flags" in "struct rev_list_info"
  rev-list: remove last static vars used in "show_commit"
  list-objects: add "void *data" parameter to show functions
  bisect--helper: string output variables together with "&amp;&amp;"
  rev-list: pass "int flags" as last argument of "show_bisect_vars"
  t6030: test bisecting with paths
  bisect: use "bisect--helper" and remove "filter_skipped" function
  bisect: implement "read_bisect_paths" to read paths in "$GIT_DIR/BISECT_NAMES"
  bisect--helper: implement "git bisect--helper"
  bisect: use the new generic "sha1_pos" function to lookup sha1
  rev-list: call new "filter_skip" function
  patch-ids: use the new generic "sha1_pos" function to lookup sha1
  sha1-lookup: add new "sha1_pos" function to efficiently lookup sha1
  rev-list: pass "revs" to "show_bisect_vars"
  rev-list: make "show_bisect_vars" non static
  rev-list: move code to show bisect vars into its own function
  rev-list: move bisect related code into its own file
  rev-list: make "bisect_list" variable local to "cmd_rev_list"
  refs: add "for_each_ref_in" function to refactor "for_each_*_ref" functions
  quote: add "sq_dequote_to_argv" to put unwrapped args in an argv array
  ...
</content>
</entry>
<entry>
<title>bisect--helper: string output variables together with "&amp;&amp;"</title>
<updated>2009-04-05T08:29:45Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2009-03-30T04:59:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e89aa6d2f546b2d4f2d88c15ce7e343751d6922f'/>
<id>urn:sha1:e89aa6d2f546b2d4f2d88c15ce7e343751d6922f</id>
<content type='text'>
When doing:

eval "git bisect--helper --next-vars" | {
        while read line
        do
                echo "$line &amp;&amp;"
        done
        echo ':'
}

the result code comes from the last "echo ':'", not from running
"git bisect--helper --next-vars".

This patch gets rid of the need to string together the line from
the output of "git bisect--helper" with "&amp;&amp;" in the calling script
by making "git bisect--helper --next-vars" return output variables
already in that format.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bisect: use "bisect--helper" and remove "filter_skipped" function</title>
<updated>2009-04-05T08:29:44Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2009-03-26T04:56:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=23b5f18b50c15155f79618522b5721b880eceb65'/>
<id>urn:sha1:23b5f18b50c15155f79618522b5721b880eceb65</id>
<content type='text'>
Use the new "git bisect--helper" builtin. It should be faster and
safer instead of the old "filter_skipped" shell function. And it
is a first step to move more shell code to C.

As the output is a little bit different we have to change the code
that interpret the results. But these changes improve code clarity.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bisect: improve error message when branch checkout fails</title>
<updated>2009-04-05T07:25:08Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2009-04-04T20:02:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f3a186ffade15f793ea17713a10e10ec4f26ff11'/>
<id>urn:sha1:f3a186ffade15f793ea17713a10e10ec4f26ff11</id>
<content type='text'>
In "git-bisect.sh" the "git checkout" command is only used to
change the current branch, but it is used like this:

git checkout "$branch"

which will output the following misleading error message when
it fails:

error: pathspec 'foo' did not match any file(s) known to git.

This patch change the way we use "git checkout" like this:

git checkout "$branch" --

so that we will get the following error message:

fatal: invalid reference: foo

which is better.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rev-list: estimate number of bisection step left</title>
<updated>2009-03-04T08:56:52Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2009-02-21T08:26:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9f199b159580545c39716fd87038f8ff7cd0eace'/>
<id>urn:sha1:9f199b159580545c39716fd87038f8ff7cd0eace</id>
<content type='text'>
This patch teaches "git rev-list --bisect-vars" to output an estimate
of the number of bisection step left _after the current one_ along with
the other variables it already outputs.

This patch also makes "git-bisect.sh" display this number of steps left
_after the current one_, along with the estimate of the number of
revisions left to test (after the current one).

Here is a table to help analyse what should be the best estimate for
the number of bisect steps left.

N : linear case                    --&gt; probabilities --&gt; best
-------------------------------------------------------------
1 : G-B                            --&gt; 0             --&gt; 0
2 : G-U1-B                         --&gt; 0             --&gt; 0
3 : G-U1-U2-B                      --&gt; 0(1/3) 1(2/3) --&gt; 1
4 : G-U1-U2-U3-B                   --&gt; 1             --&gt; 1
5 : G-U1-U2-U3-U4-B                --&gt; 1(3/5) 2(2/5) --&gt; 1
6 : G-U1-U2-U3-U4-U5-B             --&gt; 1(2/6) 2(4/6) --&gt; 2
7 : G-U1-U2-U3-U4-U5-U6-B          --&gt; 1(1/7) 2(6/7) --&gt; 2
8 : G-U1-U2-U3-U4-U5-U6-U7-B       --&gt; 2             --&gt; 2
9 : G-U1-U2-U3-U4-U5-U6-U7-U8-B    --&gt; 2(7/9) 3(2/9) --&gt; 2
10: G-U1-U2-U3-U4-U5-U6-U7-U8-U9-B --&gt; 2(6/10)3(4/10)--&gt; 2

In the column "N", there is the number of revisions that could _now_
be the first bad commit we are looking for.

The "linear case" column describes the linear history corresponding to
the number in column N. G means good, B means bad, and Ux means
unknown. Note that the first bad revision we are looking for can be
any Ux or B.

In the "probabilities" column, there are the different outcomes in
number of steps with the odds of each outcome in parenthesis
corresponding to the linear case.

The "best" column gives the most accurate estimate among the different
outcomes in the "probabilities" column.

We have the following:

best(2^n) == n - 1

and for any x between 0 included and 2^n excluded, the probability for
n - 1 steps left looks like:

P(2^n + x) == (2^n - x) / (2^n + x)

and P(2^n + x) &lt; 0.5 means 2^n &lt; 3x

So the algorithm used in this patch calculates 2^n and x, and then
choose between returning n - 1 and n.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cc/maint-1.6.0-bisect-fix'</title>
<updated>2009-02-28T00:00:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-28T00:00:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=48fce9356531469b00bd0e1592d77e8b229316d0'/>
<id>urn:sha1:48fce9356531469b00bd0e1592d77e8b229316d0</id>
<content type='text'>
* cc/maint-1.6.0-bisect-fix:
  bisect: fix another instance of eval'ed string

Conflicts:
	git-bisect.sh
</content>
</entry>
<entry>
<title>bisect: fix another instance of eval'ed string</title>
<updated>2009-02-27T22:30:34Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2009-02-27T06:31:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cce074a2760940cb78232ce2201ab5590e274d4a'/>
<id>urn:sha1:cce074a2760940cb78232ce2201ab5590e274d4a</id>
<content type='text'>
When there is nothing to be skipped, the output from
rev-list --bisect-vars was eval'ed without first being
strung together with &amp;&amp;; this is probably not a problem
as it is much less likely to be a bad input than the list
handcrafted by the filter_skip function, but it still is
a good discipline.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cc/maint-1.6.0-bisect-fix'</title>
<updated>2009-02-27T09:03:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-02-27T09:03:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0c3473561610ac9f94c65f64178d2a66ee73eb64'/>
<id>urn:sha1:0c3473561610ac9f94c65f64178d2a66ee73eb64</id>
<content type='text'>
* cc/maint-1.6.0-bisect-fix:
  bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped

Conflicts:
	git-bisect.sh
</content>
</entry>
<entry>
<title>bisect: fix quoting TRIED revs when "bad" commit is also "skip"ped</title>
<updated>2009-02-27T08:57:28Z</updated>
<author>
<name>Christian Couder</name>
<email>chriscool@tuxfamily.org</email>
</author>
<published>2009-02-27T06:31:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1b249ffe8dff12849e3e215b46b245daecfadba0'/>
<id>urn:sha1:1b249ffe8dff12849e3e215b46b245daecfadba0</id>
<content type='text'>
When the "bad" commit was also "skip"ped and when more than one
commit was skipped, the "filter_skipped" function would have
printed something like:

    bisect_rev=&lt;hash1&gt;|&lt;hash2&gt;

(where &lt;hash1&gt; and &lt;hash2&gt; are hexadecimal sha1 hashes)

and this would have been evaled later as piping "bisect_rev=&lt;hash1&gt;"
into "&lt;hash2&gt;", which would have failed.

So this patch makes the "filter_skipped" function properly quote
what it outputs, so that it will print something like:

bisect_rev='&lt;hash1&gt;|&lt;hash2&gt;'

which will be properly evaled later.  The caller was not stopping
properly because the scriptlet this function returned to be evaled
was not strung together with &amp;&amp; and because of this, an error in
an earlier part of the output was simply ignored.

A test case is added to the test suite.

And while at it, we also initialize the VARS, FOUND and TRIED
variables, so that we protect ourselves from environment variables
the user may have with these names.

Signed-off-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bisect view: call gitk if Cygwin's SESSIONNAME variable is set</title>
<updated>2009-01-03T22:25:27Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>Johannes.Schindelin@gmx.de</email>
</author>
<published>2009-01-02T18:08:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=22b3ddd508b022c76bf36bf390691a6f62c996d5'/>
<id>urn:sha1:22b3ddd508b022c76bf36bf390691a6f62c996d5</id>
<content type='text'>
It seems that Cygwin sets the variable SESSIONNAME when an interactive
desktop session is running, and does not set it when you log in via ssh.

So we can use this variable to determine whether to run gitk or git log
in git bisect view.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
