<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/bisect.h, branch v2.26.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.26.1</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.26.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-02-19T17:37:15Z</updated>
<entry>
<title>bisect: libify `bisect_next_all`</title>
<updated>2020-02-19T17:37:15Z</updated>
<author>
<name>Pranit Bauva</name>
<email>pranit.bauva@gmail.com</email>
</author>
<published>2020-02-17T08:40:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6c69f2223394c200cce1289ac9200f781ef14da7'/>
<id>urn:sha1:6c69f2223394c200cce1289ac9200f781ef14da7</id>
<content type='text'>
Since we want to get rid of git-bisect.sh, it would be necessary to
convert those exit() calls to return statements so that errors can be
reported.

Emulate try catch in C by converting `exit(&lt;positive-value&gt;)` to
`return &lt;negative-value&gt;`. Follow POSIX conventions to return
&lt;negative-value&gt; to indicate error.

All the functions calling `bisect_next_all()` are already able to
handle return values from it.

Mentored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Mentored-by: Johannes Schindelin &lt;Johannes.Schindelin@gmx.de&gt;
Signed-off-by: Pranit Bauva &lt;pranit.bauva@gmail.com&gt;
Signed-off-by: Tanushree Tumane &lt;tanushreetumane@gmail.com&gt;
Signed-off-by: Miriam Rubio &lt;mirucam@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bisect: libify `handle_bad_merge_base` and its dependents</title>
<updated>2020-02-19T17:37:15Z</updated>
<author>
<name>Pranit Bauva</name>
<email>pranit.bauva@gmail.com</email>
</author>
<published>2020-02-17T08:40:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ec598e0d55ff263e47d95e7d4decef1eb1b6ac6'/>
<id>urn:sha1:9ec598e0d55ff263e47d95e7d4decef1eb1b6ac6</id>
<content type='text'>
Since we want to get rid of git-bisect.sh, it would be necessary to
convert those exit() calls to return statements so that errors can be
reported.

Emulate try catch in C by converting `exit(&lt;positive-value&gt;)` to
`return &lt;negative-value&gt;`. Follow POSIX conventions to return
&lt;negative-value&gt; to indicate error.

Update all callers to handle the error returns.

Mentored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Mentored-by: Johannes Schindelin &lt;Johannes.Schindelin@gmx.de&gt;
Signed-off-by: Pranit Bauva &lt;pranit.bauva@gmail.com&gt;
Signed-off-by: Tanushree Tumane &lt;tanushreetumane@gmail.com&gt;
Signed-off-by: Miriam Rubio &lt;mirucam@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bisect: libify `check_merge_bases` and its dependents</title>
<updated>2020-02-19T17:37:14Z</updated>
<author>
<name>Pranit Bauva</name>
<email>pranit.bauva@gmail.com</email>
</author>
<published>2020-02-17T08:40:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cdd4dc2d6a3e420178100efc780a987495a1a3bd'/>
<id>urn:sha1:cdd4dc2d6a3e420178100efc780a987495a1a3bd</id>
<content type='text'>
Since we want to get rid of git-bisect.sh, it would be necessary to
convert those exit() calls to return statements so that errors can be
reported.

Emulate try catch in C by converting `exit(&lt;positive-value&gt;)` to
`return &lt;negative-value&gt;`. Follow POSIX conventions to return
&lt;negative-value&gt; to indicate error.

In `check_merge_bases()` there is an early success special case,
so we have introduced special error code
BISECT_INTERNAL_SUCCESS_MERGE_BASE (-11) which indicates early
success. This BISECT_INTERNAL_SUCCESS_MERGE_BASE is converted back
to BISECT_OK (0) in `check_good_are_ancestors_of_bad()`.

Update all callers to handle the error returns.

Mentored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Mentored by: Johannes Schindelin &lt;Johannes.Schindelin@gmx.de&gt;
Signed-off-by: Pranit Bauva &lt;pranit.bauva@gmail.com&gt;
Signed-off-by: Tanushree Tumane &lt;tanushreetumane@gmail.com&gt;
Signed-off-by: Miriam Rubio &lt;mirucam@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bisect: libify `exit_if_skipped_commits` to `error_if_skipped*` and its dependents</title>
<updated>2020-02-19T17:37:14Z</updated>
<author>
<name>Pranit Bauva</name>
<email>pranit.bauva@gmail.com</email>
</author>
<published>2020-02-17T08:40:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce58b5d8b128568e9b4f37703377cbc22eaf00f5'/>
<id>urn:sha1:ce58b5d8b128568e9b4f37703377cbc22eaf00f5</id>
<content type='text'>
Since we want to get rid of git-bisect.sh, it would be necessary to
convert those exit() calls to return statements so that errors can be
reported.

Emulate try catch in C by converting `exit(&lt;positive-value&gt;)` to
`return &lt;negative-value&gt;`. Follow POSIX conventions to return
&lt;negative-value&gt; to indicate error.

Update all callers to handle the error returns.

Mentored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Mentored-by: Johannes Schindelin &lt;Johannes.Schindelin@gmx.de&gt;
Signed-off-by: Pranit Bauva &lt;pranit.bauva@gmail.com&gt;
Signed-off-by: Tanushree Tumane &lt;tanushreetumane@gmail.com&gt;
Signed-off-by: Miriam Rubio &lt;mirucam@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bisect: add enum to represent bisect returning codes</title>
<updated>2020-02-19T17:37:14Z</updated>
<author>
<name>Miriam Rubio</name>
<email>mirucam@gmail.com</email>
</author>
<published>2020-02-17T08:40:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=680e8a01e57cd383048bf4e7d9668ce715d6d649'/>
<id>urn:sha1:680e8a01e57cd383048bf4e7d9668ce715d6d649</id>
<content type='text'>
Since we want to get rid of git-bisect.sh, it would be necessary to
convert those exit() calls to return statements so that errors can be
reported.

Create an enum called `bisect_error` with the bisecting return codes
to use in `bisect.c` libification process.

Change bisect_next_all() to make it return this enum.

Mentored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Miriam Rubio &lt;mirucam@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>*.[ch]: manually align parameter lists</title>
<updated>2019-05-05T06:20:10Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-04-29T08:28:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad6dad0996f9226b2c3a5a3c725bf2952e52d7e7'/>
<id>urn:sha1:ad6dad0996f9226b2c3a5a3c725bf2952e52d7e7</id>
<content type='text'>
In previous patches, extern was mechanically removed from function
declarations without care to formatting, causing parameter lists to be
misaligned. Manually format changed sections such that the parameter
lists should be realigned.

Viewing this patch with 'git diff -w' should produce no output.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>*.[ch]: remove extern from function declarations using spatch</title>
<updated>2019-05-05T06:20:06Z</updated>
<author>
<name>Denton Liu</name>
<email>liu.denton@gmail.com</email>
</author>
<published>2019-04-29T08:28:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=554544276a604c144df45efcb060c80aa322088c'/>
<id>urn:sha1:554544276a604c144df45efcb060c80aa322088c</id>
<content type='text'>
There has been a push to remove extern from function declarations.
Remove some instances of "extern" for function declarations which are
caught by Coccinelle. Note that Coccinelle has some difficulty with
processing functions with `__attribute__` or varargs so some `extern`
declarations are left behind to be dealt with in a future patch.

This was the Coccinelle patch used:

	@@
	type T;
	identifier f;
	@@
	- extern
	  T f(...);

and it was run with:

	$ git ls-files \*.{c,h} |
		grep -v ^compat/ |
		xargs spatch --sp-file contrib/coccinelle/noextern.cocci --in-place

Files under `compat/` are intentionally excluded as some are directly
copied from external sources and we should avoid churning them as much
as possible.

Signed-off-by: Denton Liu &lt;liu.denton@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>bisect.c: remove the_repository reference</title>
<updated>2018-11-12T05:50:05Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-11-10T05:48:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=69d2cfe6e84fbcd77872191b6f433d38362c23d6'/>
<id>urn:sha1:69d2cfe6e84fbcd77872191b6f433d38362c23d6</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Add missing includes and forward declarations</title>
<updated>2018-08-15T18:52:09Z</updated>
<author>
<name>Elijah Newren</name>
<email>newren@gmail.com</email>
</author>
<published>2018-08-15T17:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ef3ca95475ce467ae883cc8175ed40e6f7d27800'/>
<id>urn:sha1:ef3ca95475ce467ae883cc8175ed40e6f7d27800</id>
<content type='text'>
I looped over the toplevel header files, creating a temporary two-line C
program for each consisting of
  #include "git-compat-util.h"
  #include $HEADER
This patch is the result of manually fixing errors in compiling those
tiny programs.

Signed-off-by: Elijah Newren &lt;newren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ma/bisect-leakfix'</title>
<updated>2017-11-15T03:14:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-11-15T03:14:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f116163171b875f9b58c6f6755bec85460e9b8b8'/>
<id>urn:sha1:f116163171b875f9b58c6f6755bec85460e9b8b8</id>
<content type='text'>
Leak fixes.

* ma/bisect-leakfix:
  bisect: fix memory leak when returning best element
  bisect: fix off-by-one error in `best_bisection_sorted()`
  bisect: fix memory leak in `find_bisection()`
  bisect: change calling-convention of `find_bisection()`
</content>
</entry>
</feed>
