<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/bisect.h, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-08-07T22:13:03Z</updated>
<entry>
<title>bisect: combine args passed to find_bisection()</title>
<updated>2020-08-07T22:13:03Z</updated>
<author>
<name>Aaron Lipman</name>
<email>alipman88@gmail.com</email>
</author>
<published>2020-08-07T21:58:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad464a4e84b502fdfd4671f1c443060c7e87113f'/>
<id>urn:sha1:ad464a4e84b502fdfd4671f1c443060c7e87113f</id>
<content type='text'>
Now that find_bisection() accepts multiple boolean arguments, these may
be combined into a single unsigned integer in order to declutter some of
the code in bisect.c

Also, rename the existing "flags" bitfield to "commit_flags", to
explicitly differentiate it from the new "bisect_flags" bitfield.

Based-on-patch-by: Harald Nordgren &lt;haraldnordgren@gmail.com&gt;
Signed-off-by: Aaron Lipman &lt;alipman88@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>cmd_bisect__helper: defer parsing no-checkout flag</title>
<updated>2020-08-07T22:13:03Z</updated>
<author>
<name>Aaron Lipman</name>
<email>alipman88@gmail.com</email>
</author>
<published>2020-08-07T21:58:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=be5fe2000df5c1110d8086e4704e1a90a64f7387'/>
<id>urn:sha1:be5fe2000df5c1110d8086e4704e1a90a64f7387</id>
<content type='text'>
cmd_bisect__helper() is intended as a temporary shim layer serving as an
interface for git-bisect.sh. This function and git-bisect.sh should
eventually be replaced by a C implementation, cmd_bisect(), serving as
an entrypoint for all "git bisect ..." shell commands: cmd_bisect() will
only parse the first token following "git bisect", and dispatch the
remaining args to the appropriate function ["bisect_start()",
"bisect_next()", etc.].

Thus, cmd_bisect__helper() should not be responsible for parsing flags
like --no-checkout. Instead, let the --no-checkout flag remain in the
argv array, so it may be evaluated alongside the other options already
parsed by bisect_start().

Signed-off-by: Aaron Lipman &lt;alipman88@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>rev-list: allow bisect and first-parent flags</title>
<updated>2020-08-07T22:11:59Z</updated>
<author>
<name>Aaron Lipman</name>
<email>alipman88@gmail.com</email>
</author>
<published>2020-08-07T21:58:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0fe305a5d342225976688b1bd68dc4dc179b66b3'/>
<id>urn:sha1:0fe305a5d342225976688b1bd68dc4dc179b66b3</id>
<content type='text'>
Add first_parent_only parameter to find_bisection(), removing the
barrier that prevented combining the --bisect and --first-parent flags
when using git rev-list

Based-on-patch-by: Tiago Botelho &lt;tiagonbotelho@hotmail.com&gt;
Signed-off-by: Aaron Lipman &lt;alipman88@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
