<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/patch-id.c, branch main</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=main</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2026-01-09T14:07:21Z</updated>
<entry>
<title>patch-id: use “patch ID” throughout</title>
<updated>2026-01-09T14:07:21Z</updated>
<author>
<name>Kristoffer Haugsbakk</name>
<email>code@khaugsbakk.name</email>
</author>
<published>2026-01-08T06:28:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=285659cc983a60f89a60f96cff7397375766f3f8'/>
<id>urn:sha1:285659cc983a60f89a60f96cff7397375766f3f8</id>
<content type='text'>
The “Description” section decided to introduce and use the term “patch
ID” for the ID value itself.  Let’s use the same term on the options as
well.

Also make to sure to use bare “ID” instead of “id”.

Signed-off-by: Kristoffer Haugsbakk &lt;code@khaugsbakk.name&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: move Git config parsing into "environment.c"</title>
<updated>2025-07-23T15:15:22Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-07-23T14:08:41Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=08b775864edf96b97500fd70446c55528f5cf4a6'/>
<id>urn:sha1:08b775864edf96b97500fd70446c55528f5cf4a6</id>
<content type='text'>
In "config.c" we host both the business logic to read and write config
files as well as the logic to parse specific Git-related variables. On
the one hand this is mixing concerns, but even more importantly it means
that we cannot easily remove the dependency on `the_repository` in our
config parsing logic.

Move the logic into "environment.c". This file is a grab bag of all
kinds of global state already, so it is quite a good fit. Furthermore,
it also hosts most of the global variables that we're parsing the config
values into, making this an even better fit.

Note that there is one hidden change: in `parse_fsync_components()` we
use an `int` to iterate through `ARRAY_SIZE(fsync_component_names)`. But
as -Wsign-compare warnings are enabled in this file this causes a
compiler warning. The issue is fixed by using a `size_t` instead.

This change allows us to drop the `USE_THE_REPOSITORY_VARIABLE`
declaration.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: drop `git_config()` wrapper</title>
<updated>2025-07-23T15:15:18Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-07-23T14:08:22Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=9ce196e86b455fa2552812802c58f30c090c94af'/>
<id>urn:sha1:9ce196e86b455fa2552812802c58f30c090c94af</id>
<content type='text'>
In 036876a1067 (config: hide functions using `the_repository` by
default, 2024-08-13) we have moved around a bunch of functions in the
config subsystem that depend on `the_repository`. Those function have
been converted into mere wrappers around their equivalent function that
takes in a repository as parameter, and the intent was that we'll
eventually remove those wrappers to make the dependency on the global
repository variable explicit at the callsite.

Follow through with that intent and remove `git_config()`. All callsites
are adjusted so that they use `repo_config(the_repository, ...)`
instead. While some callsites might already have a repository available,
this mechanical conversion is the exact same as the current situation
and thus cannot cause any regression. Those sites should eventually be
cleaned up in a later patch series.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin: use default hash when outside a repository</title>
<updated>2025-07-01T21:58:24Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2025-07-01T21:22:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=dc9c16c2fc8222364277696cb4d70782281d3c06'/>
<id>urn:sha1:dc9c16c2fc8222364277696cb4d70782281d3c06</id>
<content type='text'>
We have some commands that can operate inside or outside a repository.
If we're operating outside a repository, we clearly cannot use the
repository's hash algorithm as a default since it doesn't exist, so
instead, let's pick the default instead of specifically SHA-1.  Right
now this results in no functional change since the default is SHA-1, but
that may change in the future.

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>global: adapt callers to use generic hash context helpers</title>
<updated>2025-01-31T18:06:11Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-01-31T12:55:31Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=0578f1e66aa381356bfe2f53decf3864d88d23d3'/>
<id>urn:sha1:0578f1e66aa381356bfe2f53decf3864d88d23d3</id>
<content type='text'>
Adapt callers to use generic hash context helpers instead of using the
hash algorithm to update them. This makes the callsites easier to reason
about and removes the possibility that the wrong hash algorithm is used
to update the hash context's state. And as a nice side effect this also
gets rid of a bunch of users of `the_hash_algo`.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hash: stop typedeffing the hash context</title>
<updated>2025-01-31T18:06:10Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-01-31T12:55:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=7346e340f147131ca32089f61f7d0f502f80d19d'/>
<id>urn:sha1:7346e340f147131ca32089f61f7d0f502f80d19d</id>
<content type='text'>
We generally avoid using `typedef` in the Git codebase. One exception
though is the `git_hash_ctx`, likely because it used to be a union
rather than a struct until the preceding commit refactored it. But now
that it is a normal `struct` there isn't really a need for a typedef
anymore.

Drop the typedef and adapt all callers accordingly.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/patch-id: fix type of `get_one_patchid()`</title>
<updated>2024-12-06T11:20:05Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-12-06T10:27:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=efb38ad49fb2dd7bf6e732df0c59f3c1aeba2f76'/>
<id>urn:sha1:efb38ad49fb2dd7bf6e732df0c59f3c1aeba2f76</id>
<content type='text'>
In `get_one_patchid()` we assign either the result of `strlen()` or
`remove_space()` to `len`. But while the former correctly returns a
`size_t`, the latter returns an `int` to indicate the length of the
stripped string even though it cannot ever return a negative value. This
causes a warning with "-Wsign-conversion".

In fact, even `get_one_patchid()` itself is also using an integer as
return value even though it always returns the length of the patch, and
this bubbles up to other callers.

Adapt the function and its helpers to use `size_t` for string lengths
consistently.

Signed-off-by: Patrick Steinhardt &lt;ps@pks.im&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='http://git.kilabit.info/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>
<entry>
<title>Merge branch 'jc/pass-repo-to-builtins'</title>
<updated>2024-09-23T17:35:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-09-23T17:35:09Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=b8e318ea58a0502ff99f37032ee8ac536df4e730'/>
<id>urn:sha1:b8e318ea58a0502ff99f37032ee8ac536df4e730</id>
<content type='text'>
The convention to calling into built-in command implementation has
been updated to pass the repository, if known, together with the
prefix value.

* jc/pass-repo-to-builtins:
  add: pass in repo variable instead of global the_repository
  builtin: remove USE_THE_REPOSITORY for those without the_repository
  builtin: remove USE_THE_REPOSITORY_VARIABLE from builtin.h
  builtin: add a repository parameter for builtin functions
</content>
</entry>
<entry>
<title>Revert "Merge branch 'jc/patch-id' into maint-2.46"</title>
<updated>2024-09-16T22:12:06Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-09-16T22:12:06Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=d6bf6527ebfab4899d52d5662f3c5054195e6415'/>
<id>urn:sha1:d6bf6527ebfab4899d52d5662f3c5054195e6415</id>
<content type='text'>
This reverts commit 41c952ebacf7e3369e7bee721f768114d65e50c4,
reversing changes made to 712d970c0145b95ce655773e7cd1676f09dfd215.
Keeping a known breakage for now is better than introducing new
regression(s).
</content>
</entry>
</feed>
