<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/version.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-02-08T23:16:49Z</updated>
<entry>
<title>version: stop using the_repository</title>
<updated>2026-02-08T23:16:49Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2026-02-08T17:01:24Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=6c21e53badfc31883fa30fdb009d6b983e9e42ac'/>
<id>urn:sha1:6c21e53badfc31883fa30fdb009d6b983e9e42ac</id>
<content type='text'>
Actually it has never been used in version.c since cf7ee481902 (agent:
advertise OS name via agent capability, 2025-02-15) added the dependency
macro.  Remove it, along with the also unused struct declaration.

Signed-off-by: René Scharfe &lt;l.s.r@web.de&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='http://git.kilabit.info/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>agent: advertise OS name via agent capability</title>
<updated>2025-02-19T17:48:37Z</updated>
<author>
<name>Usman Akinyemi</name>
<email>usmanakinyemi202@gmail.com</email>
</author>
<published>2025-02-15T15:50:52Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=cf7ee481902df64b26ac8b1741eca861a8d2f7cc'/>
<id>urn:sha1:cf7ee481902df64b26ac8b1741eca861a8d2f7cc</id>
<content type='text'>
As some issues that can happen with a Git client can be operating system
specific, it can be useful for a server to know which OS a client is
using. In the same way it can be useful for a client to know which OS
a server is using.

Our current agent capability is in the form of "package/version" (e.g.,
"git/1.8.3.1"). Let's extend it to include the operating system name (os)
i.e in the form "package/version-os" (e.g., "git/1.8.3.1-Linux").

Including OS details in the agent capability simplifies implementation,
maintains backward compatibility, avoids introducing a new capability,
encourages adoption across Git-compatible software, and enhances
debugging by providing complete environment information without affecting
functionality. The operating system name is retrieved using the 'sysname'
field of the `uname(2)` system call or its equivalent.

However, there are differences between `uname(1)` (command-line utility)
and `uname(2)` (system call) outputs on Windows. These discrepancies
complicate testing on Windows platforms. For example:
  - `uname(1)` output: MINGW64_NT-10.0-20348.3.4.10-87d57229.x86_64\
  .2024-02-14.20:17.UTC.x86_64
  - `uname(2)` output: Windows.10.0.20348

On Windows, uname(2) is not actually system-supplied but is instead
already faked up by Git itself. We could have overcome the test issue
on Windows by implementing a new `uname` subcommand in `test-tool`
using uname(2), but except uname(2), which would be tested against
itself, there would be nothing platform specific, so it's just simpler
to disable the tests on Windows.

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: 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='http://git.kilabit.info/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='http://git.kilabit.info/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>version: refactor redact_non_printables()</title>
<updated>2025-02-18T17:05:12Z</updated>
<author>
<name>Usman Akinyemi</name>
<email>usmanakinyemi202@gmail.com</email>
</author>
<published>2025-02-15T15:50:48Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=cdfd081df6fa42e6cd0da1d978d41b836c1f292b'/>
<id>urn:sha1:cdfd081df6fa42e6cd0da1d978d41b836c1f292b</id>
<content type='text'>
The git_user_agent_sanitized() function performs some sanitizing to
avoid special characters being sent over the line and possibly messing
up with the protocol or with the parsing on the other side.

Let's extract this sanitizing into a new redact_non_printables() function,
as we will want to reuse it in a following patch.

For now the new redact_non_printables() function is still static as
it's only needed locally.

While at it, let's use strbuf_detach() to explicitly detach the string
contained by the 'buf' strbuf.

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: replace manual ASCII checks with isprint() for clarity</title>
<updated>2025-02-18T17:05:12Z</updated>
<author>
<name>Usman Akinyemi</name>
<email>usmanakinyemi202@gmail.com</email>
</author>
<published>2025-02-15T15:50:47Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=0c124cba5435c59591da7c91e16bbd901a518bd4'/>
<id>urn:sha1:0c124cba5435c59591da7c91e16bbd901a518bd4</id>
<content type='text'>
Since the isprint() function checks for printable characters, let's
replace the existing hardcoded ASCII checks with it. However, since
the original checks also handled spaces, we need to account for spaces
explicitly in the new check.

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>meson: ensure correct version-def.h is used</title>
<updated>2025-01-14T19:14:54Z</updated>
<author>
<name>Toon Claes</name>
<email>toon@iotcl.com</email>
</author>
<published>2025-01-14T11:15:23Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4771501c0a125dd3560391cbd716c63a281e8244'/>
<id>urn:sha1:4771501c0a125dd3560391cbd716c63a281e8244</id>
<content type='text'>
To build the libgit-version library, Meson first generates
`version-def.h` in the build directory. Then it compiles `version.c`
into a library. During compilation, Meson tells to include both the
build directory and the project root directory.

However, when the user previously has compiled Git using Make, they will
have a `version-def.h` file in project root directory as well. Because
`version-def.h` is included in `version.c` using the #include directive
with double quotes, some preprocessors will look for the header file in
the same directory as the source file. This will cause compilation of
`version.c` ran by Meson to include `version-def.h` previously made by
Make, which might be out of date.

To explicitly tell the preprocessor which `version-def.h` to use, pass
the absolute path of this file as macro GIT_VERSION_H to the
preprocessor using option `-D` and have `version.c` `#include
GIT_VERSION_H`. To remain working with other build systems than Meson,
include "version-def.h" if that macro is not defined.

Co-authored-by: Patrick Steinhardt &lt;ps@pks.im&gt;
Signed-off-by: Toon Claes &lt;toon@iotcl.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/build-sign-compare'</title>
<updated>2024-12-23T17:32:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-12-23T17:32:10Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4156b6a741c7fb15a4eccb320612fb6e453f439c'/>
<id>urn:sha1:4156b6a741c7fb15a4eccb320612fb6e453f439c</id>
<content type='text'>
Start working to make the codebase buildable with -Wsign-compare.

* ps/build-sign-compare:
  t/helper: don't depend on implicit wraparound
  scalar: address -Wsign-compare warnings
  builtin/patch-id: fix type of `get_one_patchid()`
  builtin/blame: fix type of `length` variable when emitting object ID
  gpg-interface: address -Wsign-comparison warnings
  daemon: fix type of `max_connections`
  daemon: fix loops that have mismatching integer types
  global: trivial conversions to fix `-Wsign-compare` warnings
  pkt-line: fix -Wsign-compare warning on 32 bit platform
  csum-file: fix -Wsign-compare warning on 32-bit platform
  diff.h: fix index used to loop through unsigned integer
  config.mak.dev: drop `-Wno-sign-compare`
  global: mark code units that generate warnings with `-Wsign-compare`
  compat/win32: fix -Wsign-compare warning in "wWinMain()"
  compat/regex: explicitly ignore "-Wsign-compare" warnings
  git-compat-util: introduce macros to disable "-Wsign-compare" warnings
</content>
</entry>
<entry>
<title>Makefile: propagate Git version via generated header</title>
<updated>2024-12-06T22:52:08Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-12-06T13:24:39Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=0c8d33951400f7d7175e1dad51e970fb70849f2b'/>
<id>urn:sha1:0c8d33951400f7d7175e1dad51e970fb70849f2b</id>
<content type='text'>
We set up a couple of preprocessor macros when compiling Git that
propagate the version that Git was built from to `git version` et al.
The way this is set up makes it harder than necessary to reuse the
infrastructure across the different build systems.

Refactor this such that we generate a "version-def.h" header via
`GIT-VERSION-GEN` instead.

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