<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/bisect.c, branch v2.37.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.37.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.37.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-04-14T06:56:08Z</updated>
<entry>
<title>revisions API users: use release_revisions() needing REV_INFO_INIT</title>
<updated>2022-04-14T06:56:08Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-04-13T20:01:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f196c1e908db9242206e1fc9c64f33baf92676bb'/>
<id>urn:sha1:f196c1e908db9242206e1fc9c64f33baf92676bb</id>
<content type='text'>
Use release_revisions() to various users of "struct rev_list" which
need to have their "struct rev_info" zero-initialized before we can
start using it.

For the bundle.c code see the early exit case added in
3bbbe467f29 (bundle verify: error out if called without an object
database, 2019-05-27).

For the relevant bisect.c code see 45b6370812c (bisect: libify
`check_good_are_ancestors_of_bad` and its dependents, 2020-02-17).

For the submodule.c code see the "goto" on "(!left || !right || !sub)"
added in 8e6df65015f (submodule: refactor show_submodule_summary with
helper function, 2016-08-31).

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>revisions API users: add straightforward release_revisions()</title>
<updated>2022-04-14T06:56:08Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-04-13T20:01:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2108fe4a1976f95821e13503fd331f075da398c6'/>
<id>urn:sha1:2108fe4a1976f95821e13503fd331f075da398c6</id>
<content type='text'>
Add a release_revisions() to various users of "struct rev_list" in
those straightforward cases where we only need to add the
release_revisions() call to the end of a block, and don't need to
e.g. refactor anything to use a "goto cleanup" pattern.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bisect--helper: double-check run command on exit code 126 and 127</title>
<updated>2022-01-19T17:35:03Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2022-01-18T12:46:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=48af1fdee374e205c9774c163fbd4683d1110d11'/>
<id>urn:sha1:48af1fdee374e205c9774c163fbd4683d1110d11</id>
<content type='text'>
When a run command cannot be executed or found, shells return exit code
126 or 127, respectively.  Valid run commands are allowed to return
these codes as well to indicate bad revisions, though, for historical
reasons.  This means typos can cause bogus bisect runs that go over the
full distance and end up reporting invalid results.

The best solution would be to reserve exit codes 126 and 127, like
71b0251cdd (Bisect run: "skip" current commit if script exit code is
125., 2007-10-26) did for 125, and abort bisect run when we get them.
That might be inconvenient for those who relied on the documentation
stating that 126 and 127 can be used for bad revisions, though.

The workaround used by this patch is to run the command on a known-good
revision and abort if we still get the same error code.  This adds one
step to runs with scripts that use exit codes 126 and 127, but keeps
them supported, with one exception: It won't work with commands that
cannot recognize the (manually marked) known-good revision as such.

Run commands that use low exit codes are unaffected.  Typos are reported
after executing the missing command twice and three checkouts (the first
step, the known good revision and back to the revision of the first
step).

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bisect: simplify return code from bisect_checkout()</title>
<updated>2021-07-28T17:57:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-07-28T17:07:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1fcc40cd1dbfbdf6879a7b60a3a0250e46dc5c60'/>
<id>urn:sha1:1fcc40cd1dbfbdf6879a7b60a3a0250e46dc5c60</id>
<content type='text'>
The function was designed to return only BISECT_OK (0) or
BISECT_FAILED (-1) and no other values, but there were two issues:

 - The comment misspelled BISECT_FAILED as BISECT_FAILURE, even
   though the logic it described (i.e. any non-zero return should be
   reported as a single BISECT_FAILED) was correct.

 - It took the return value from run_command_v_opt(), and assumed it
   was either -1 or 1 upon error, which is not the case; it can relay
   errors from wait_or_whine(), which can report exit status of the
   child process.

Translate any error return from run_command_v_opt() to BISECT_FAILED,
and simplify the resulting code by losing the 'res' variable that is
no longer needed.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bisect: do not run show-branch just to show the current commit</title>
<updated>2021-07-28T17:57:26Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-07-27T18:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ffcb4e94d309db2889dac1d3dcbd0f4b2a0f6390'/>
<id>urn:sha1:ffcb4e94d309db2889dac1d3dcbd0f4b2a0f6390</id>
<content type='text'>
In scripted versions of "git bisect", we used "git show-branch" to
describe a single commit in the bisect log and also to the interactive
user after checking out the next version to be tested.

The former use of "git show-branch" was lost when the helper
function that wrote bisect log entries was rewritten at 0f30233a
(bisect--helper: `bisect_write` shell function in C, 2019-01-02) in
C

But we've kept the latter ever since 0871984d (bisect: make "git
bisect" use new "--next-all" bisect-helper function, 2009-05-09)
started using the faithful C-rewrite introduced at ef24c7ca
(bisect--helper: add "--next-exit" to output bisect results,
2009-04-19).

Showing "[&lt;full hex&gt;] &lt;subject&gt;" is simple enough with our helper
pretty.c::format_commit_message() and spawning show-branch is an
overkill.  Let's lose one external process.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use CALLOC_ARRAY</title>
<updated>2021-03-14T00:00:09Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2021-03-13T16:17:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ca56dadb4b65ccaeab809d80db80a312dc00941a'/>
<id>urn:sha1:ca56dadb4b65ccaeab809d80db80a312dc00941a</id>
<content type='text'>
Add and apply a semantic patch for converting code that open-codes
CALLOC_ARRAY to use it instead.  It shortens the code and infers the
element size automatically.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/params-vs-args'</title>
<updated>2021-02-26T00:43:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-02-26T00:43:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1c8f5dfa422015e3a5a3cebb06d00ba389bd4d33'/>
<id>urn:sha1:1c8f5dfa422015e3a5a3cebb06d00ba389bd4d33</id>
<content type='text'>
Messages update.

* js/params-vs-args:
  replace "parameters" by "arguments" in error messages
</content>
</entry>
<entry>
<title>replace "parameters" by "arguments" in error messages</title>
<updated>2021-02-23T21:30:45Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2021-02-23T21:11:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b865734760c2f677d625a1d939071844048051e4'/>
<id>urn:sha1:b865734760c2f677d625a1d939071844048051e4</id>
<content type='text'>
When an error message informs the user about an incorrect command
invocation, it should refer to "arguments", not "parameters".

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hash-lookup: rename from sha1-lookup</title>
<updated>2021-01-04T21:01:55Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2020-12-31T11:56:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc626927575cea80b8bc5fd0dbb6c6439e34e606'/>
<id>urn:sha1:bc626927575cea80b8bc5fd0dbb6c6439e34e606</id>
<content type='text'>
Change all remnants of "sha1" in hash-lookup.c and .h and rename them to
reflect that we're not just able to handle SHA-1 these days.

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Reviewed-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sg/bisect-approximately-halfway'</title>
<updated>2020-11-25T23:24:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-25T23:24:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2557c1183a6c6025bc0dd6ebd84354064bb398ec'/>
<id>urn:sha1:2557c1183a6c6025bc0dd6ebd84354064bb398ec</id>
<content type='text'>
"git bisect start/next" in a large span of history spends a lot of
time trying to come up with exactly the half-way point; this can be
optimized by stopping when we see a commit that is close enough to
the half-way point.

* sg/bisect-approximately-halfway:
  bisect: loosen halfway() check for a large number of commits
</content>
</entry>
</feed>
