<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/help.c, branch v2.50.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.50.0</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.50.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-05-15T20:46:47Z</updated>
<entry>
<title>Avoid redundant conditions</title>
<updated>2025-05-15T20:46:47Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2025-05-15T13:11:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3d39bcd98ecce0fce77b00fd680bd245b2161ddf'/>
<id>urn:sha1:3d39bcd98ecce0fce77b00fd680bd245b2161ddf</id>
<content type='text'>
While `if (i &lt;= 0) ... else if (i &gt; 0) ...` is technically equivalent to
`if (i &lt;= 0) ... else ...`, the latter is vastly easier to read because
it avoids writing out a condition that is unnecessary. Let's drop such
unnecessary conditions.

Pointed out by CodeQL.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help: include unsafe SHA-1 build info in version</title>
<updated>2025-04-07T21:39:27Z</updated>
<author>
<name>Justin Tobler</name>
<email>jltobler@gmail.com</email>
</author>
<published>2025-04-03T14:05:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6cf65440d39250880e747d2c5281881e95eb9499'/>
<id>urn:sha1:6cf65440d39250880e747d2c5281881e95eb9499</id>
<content type='text'>
In 06c92dafb8 (Makefile: allow specifying a SHA-1 for non-cryptographic
uses, 2024-09-26), support for unsafe SHA-1 is added. Add the unsafe
SHA-1 build info to `git version --build-info` and update corresponding
documentation.

Signed-off-by: Justin Tobler &lt;jltobler@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help: include SHA implementation in version info</title>
<updated>2025-04-07T21:39:26Z</updated>
<author>
<name>Justin Tobler</name>
<email>jltobler@gmail.com</email>
</author>
<published>2025-04-03T14:05:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=16fd6c85e4d036e789916e4d802b47a792fe496e'/>
<id>urn:sha1:16fd6c85e4d036e789916e4d802b47a792fe496e</id>
<content type='text'>
When the `--build-options` flag is used with git-version(1), additional
information about the built version of Git is printed. During build
time, different SHA implementations may be configured, but this
information is not included in the version info.

Add the SHA implementations Git is built with to the version info by
requiring each backend to define a SHA1_BACKEND or SHA256_BACKEND symbol
as appropriate and use the value in the printed build options.

Signed-off-by: Justin Tobler &lt;jltobler@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'tc/zlib-ng-fix'</title>
<updated>2025-03-12T19:06:58Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-03-12T19:06:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=870c74987be9323012b9a55841143758fe4fccec'/>
<id>urn:sha1:870c74987be9323012b9a55841143758fe4fccec</id>
<content type='text'>
"git version --build-options" stopped showing zlib version by
mistake due to recent refactoring, which has been corrected.

* tc/zlib-ng-fix:
  help: print zlib-ng version number
  help: include git-zlib.h to print zlib version
</content>
</entry>
<entry>
<title>help: print zlib-ng version number</title>
<updated>2025-03-07T20:23:30Z</updated>
<author>
<name>Toon Claes</name>
<email>toon@iotcl.com</email>
</author>
<published>2025-03-07T14:18:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2b1e0f8cd5058c7e0b85760e54706b9e74cb4766'/>
<id>urn:sha1:2b1e0f8cd5058c7e0b85760e54706b9e74cb4766</id>
<content type='text'>
When building against zlib-ng, the header file `zlib.h` is not included,
but `zlib-ng.h` is included instead. It's `zlib.h` that defines
`ZLIB_VERSION` and that macro is used to print out zlib version in
`git-version(1)` with `--build-options`. But when it's not defined, no
version is printed.

`zlib-ng.h` defines another macro: `ZLIBNG_VERSION`. Use that macro to
print the zlib-ng version in `git version --build-options` when it's
set. Otherwise fallback to `ZLIB_VERSION`.

Signed-off-by: Toon Claes &lt;toon@iotcl.com&gt;
Helped-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Reviewed-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help: include git-zlib.h to print zlib version</title>
<updated>2025-03-07T20:23:29Z</updated>
<author>
<name>Toon Claes</name>
<email>toon@iotcl.com</email>
</author>
<published>2025-03-07T14:18:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=49d9cd8dea520a318412792b50ab4b91ce71b9fe'/>
<id>urn:sha1:49d9cd8dea520a318412792b50ab4b91ce71b9fe</id>
<content type='text'>
In 41f1a8435a (git-compat-util: move include of "compat/zlib.h" into
"git-zlib.h", 2025-01-28) some code was refactored to enable easier
linking against zlib-ng.

This removed `zlib.h` being indirectly included in `help.c`. As this
file uses `ZLIB_VERSION` to print the version number of zlib when
running git-version(1) with `--build-options`, this resulted in a
regression.

Include `git-zlib.h` directly into `help.c` to print zlib version
information. This brings back the zlib version in the output of
`git version --build-options`.

Signed-off-by: Toon Claes &lt;toon@iotcl.com&gt;
Reviewed-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help: add "show" as a valid configuration value</title>
<updated>2025-02-03T23:22:05Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2025-02-01T21:33:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e4542d8b35788c355164794457d46667378e9354'/>
<id>urn:sha1:e4542d8b35788c355164794457d46667378e9354</id>
<content type='text'>
Add a literal value for showing the suggested autocorrection
for consistency with the rest of the help.autocorrect options.

Signed-off-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help: show the suggested command when help.autocorrect is false</title>
<updated>2025-02-03T23:22:03Z</updated>
<author>
<name>David Aguilar</name>
<email>davvid@gmail.com</email>
</author>
<published>2025-02-01T21:33:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e21bf2c4314840dba4f45c6e7bbc96a6fc0a8f61'/>
<id>urn:sha1:e21bf2c4314840dba4f45c6e7bbc96a6fc0a8f61</id>
<content type='text'>
Make the handling of false boolean values for help.autocorrect
consistent with the handling of value 0 by showing the suggested
commands but not running them.

Suggested-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: David Aguilar &lt;davvid@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>help: interpret boolean string values for help.autocorrect</title>
<updated>2025-01-13T16:20:01Z</updated>
<author>
<name>Scott Chacon</name>
<email>schacon@gmail.com</email>
</author>
<published>2025-01-13T09:33:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4e3dd47c9d5f9dcae0a0d6c59c6676213914ac0e'/>
<id>urn:sha1:4e3dd47c9d5f9dcae0a0d6c59c6676213914ac0e</id>
<content type='text'>
A help.autocorrect value of 1 is currently interpreted as "wait 1
decisecond", which can be confusing to users who believe they are setting a
boolean value to turn the autocorrect feature on.

Interpret the value of help.autocorrect as either one of the accepted list
of special values ("never", "immediate", ...), a boolean or an integer. If
the value is 1, it is no longer interpreted as a decisecond value of 0.1s
but as a true boolean, the equivalent of "immediate". If the value is 2 or
more, continue treating it as a decisecond wait time.

False boolean string values ("off", "false", "no") are now equivalent to
"never", meaning that guessed values are still shown but nothing is
executed. True boolean string values are interpreted as "immediate".

Signed-off-by: Scott Chacon &lt;schacon@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>global: mark code units that generate warnings with `-Wsign-compare`</title>
<updated>2024-12-06T11:20:02Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-12-06T10:27:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41f43b8243f42b9df2e98be8460646d4c0100ad3'/>
<id>urn:sha1:41f43b8243f42b9df2e98be8460646d4c0100ad3</id>
<content type='text'>
Mark code units that generate warnings with `-Wsign-compare`. This
allows for a structured approach to get rid of all such warnings over
time in a way that can be easily measured.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
