<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/builtin/bugreport.c, branch jch</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=jch</id>
<link rel='self' href='https://git.shady.money/git/atom?h=jch'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-04-15T15:24:35Z</updated>
<entry>
<title>object-file: move `safe_create_leading_directories()` into "path.c"</title>
<updated>2025-04-15T15:24:35Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-04-15T09:38:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1a99fe8010642a71063536510c578c1543d763b4'/>
<id>urn:sha1:1a99fe8010642a71063536510c578c1543d763b4</id>
<content type='text'>
The `safe_create_leading_directories()` function and its relatives are
located in "object-file.c", which is not a good fit as they provide
generic functionality not related to objects at all. Move them into
"path.c", which already hosts `safe_create_dir()` and its relative
`safe_create_dir_in_gitdir()`.

"path.c" is free of `the_repository`, but the moved functions depend on
`the_repository` to read the "core.sharedRepository" config. Adapt the
function signature to accept a repository as argument to fix the issue
and adjust 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>Merge branch 'ua/os-version-capability'</title>
<updated>2025-02-27T23:23:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-02-27T23:22:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9d8cce051add2eb82cb0be97a58201c1d3fe0c1b'/>
<id>urn:sha1:9d8cce051add2eb82cb0be97a58201c1d3fe0c1b</id>
<content type='text'>
The value of "uname -s" is by default sent over the wire as a part
of the "version" capability.

* ua/os-version-capability:
  agent: advertise OS name via agent capability
  t5701: add setup test to remove side-effect dependency
  version: extend get_uname_info() to hide system details
  version: refactor get_uname_info()
  version: refactor redact_non_printables()
  version: replace manual ASCII checks with isprint() for clarity
</content>
</entry>
<entry>
<title>version: extend get_uname_info() to hide system details</title>
<updated>2025-02-18T17:05:12Z</updated>
<author>
<name>Usman Akinyemi</name>
<email>usmanakinyemi202@gmail.com</email>
</author>
<published>2025-02-15T15:50:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6aa09fd8726b7e8de37c0187a83c2c0fca280358'/>
<id>urn:sha1:6aa09fd8726b7e8de37c0187a83c2c0fca280358</id>
<content type='text'>
Currently, get_uname_info() function provides the full OS information.
In a following commit, we will need it to provide only the OS name.

Let's extend it to accept a "full" flag that makes it switch between
providing full OS information and providing only the OS name.

We may need to refactor this function in the future if an
`osVersion.format` is added.

Mentored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Usman Akinyemi &lt;usmanakinyemi202@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>version: refactor get_uname_info()</title>
<updated>2025-02-18T17:05:12Z</updated>
<author>
<name>Usman Akinyemi</name>
<email>usmanakinyemi202@gmail.com</email>
</author>
<published>2025-02-15T15:50:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0a78d61247922f30ebf2ce09025dcaa7bd7e3583'/>
<id>urn:sha1:0a78d61247922f30ebf2ce09025dcaa7bd7e3583</id>
<content type='text'>
Some code from "builtin/bugreport.c" uses uname(2) to get system
information.

Let's refactor this code into a new get_uname_info() function, so
that we can reuse it in a following commit.

Mentored-by: Christian Couder &lt;chriscool@tuxfamily.org&gt;
Signed-off-by: Usman Akinyemi &lt;usmanakinyemi202@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diagnose: stop using `the_repository`</title>
<updated>2024-12-18T18:44:31Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-12-17T06:43:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4c476c43a1125300614d2e9ec9dedfa44355515'/>
<id>urn:sha1:b4c476c43a1125300614d2e9ec9dedfa44355515</id>
<content type='text'>
Stop using `the_repository` in the "diagnose" subsystem by passing in a
repository when generating a diagnostics archive.

Adjust callers accordingly by using `the_repository`. While there may be
some callers that have a repository available in their context, this
trivial conversion allows for easier verification and bubbles up the use
of `the_repository` by one level.

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: remove USE_THE_REPOSITORY_VARIABLE from builtin.h</title>
<updated>2024-09-13T21:32:24Z</updated>
<author>
<name>John Cai</name>
<email>johncai86@gmail.com</email>
</author>
<published>2024-09-13T21:16:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=03eae9afb447ad4add2f18a1adb3589f050d596f'/>
<id>urn:sha1:03eae9afb447ad4add2f18a1adb3589f050d596f</id>
<content type='text'>
Instead of including USE_THE_REPOSITORY_VARIABLE by default on every
builtin, remove it from builtin.h and add it to all the builtins that
include builtin.h (by definition, that means all builtins/*.c).

Also, remove the include statement for repository.h since it gets
brought in through builtin.h.

The next step will be to migrate each builtin
from having to use the_repository.

Signed-off-by: John Cai &lt;johncai86@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin: add a repository parameter for builtin functions</title>
<updated>2024-09-13T21:27:08Z</updated>
<author>
<name>John Cai</name>
<email>johncai86@gmail.com</email>
</author>
<published>2024-09-13T21:16:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9b1cb5070ffb581798763eaee85cec10da969e90'/>
<id>urn:sha1:9b1cb5070ffb581798763eaee85cec10da969e90</id>
<content type='text'>
In order to reduce the usage of the global the_repository, add a
parameter to builtin functions that will get passed a repository
variable.

This commit uses UNUSED on most of the builtin functions, as subsequent
commits will modify the actual builtins to pass the repository parameter
down.

Signed-off-by: John Cai &lt;johncai86@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>hooks: remove implicit dependency on `the_repository`</title>
<updated>2024-08-13T17:01:01Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-08-13T09:13:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=169c979771158ddc3310f7a1e0e141fd7d0ed088'/>
<id>urn:sha1:169c979771158ddc3310f7a1e0e141fd7d0ed088</id>
<content type='text'>
We implicitly depend on `the_repository` in our hook subsystem because
we use `strbuf_git_path()` to compute hook paths. Remove this dependency
by accepting a `struct repository` as parameter instead.

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: improve const correctness when assigning string constants</title>
<updated>2024-06-07T17:30:48Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-06-07T06:37:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b567004b4b43f9b0d88aa1f0b15698eae8f15836'/>
<id>urn:sha1:b567004b4b43f9b0d88aa1f0b15698eae8f15836</id>
<content type='text'>
We're about to enable `-Wwrite-strings`, which changes the type of
string constants to `const char[]`. Fix various sites where we assign
such constants to non-const variables.

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>bugreport.c: fix a crash in `git bugreport` with `--no-suffix` option</title>
<updated>2024-03-16T16:31:42Z</updated>
<author>
<name>Jiamu Sun</name>
<email>barroit@linux.com</email>
</author>
<published>2024-03-14T04:00:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b3b57c69dad91382ccc36ebf5d668454607dd568'/>
<id>urn:sha1:b3b57c69dad91382ccc36ebf5d668454607dd568</id>
<content type='text'>
`git bugreport` does not complain when `--no-suffix` is given, but
it leads to a segmentation fault as the it is not prepared to see a
NULL assigned to the option_suffix variable.

Signed-off-by: Jiamu Sun &lt;barroit@linux.com&gt;
Acked-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
