<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/daemon.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-08-04T15:10:33Z</updated>
<entry>
<title>Merge branch 'ps/config-wo-the-repository'</title>
<updated>2025-08-04T15:10:33Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-08-04T15:10:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=540aaa607c5efcd94bb852a76a8ec3e07ea9a7bc'/>
<id>urn:sha1:540aaa607c5efcd94bb852a76a8ec3e07ea9a7bc</id>
<content type='text'>
The config API had a set of convenience wrapper functions that
implicitly use the_repository instance; they have been removed and
inlined at the calling sites.

* ps/config-wo-the-repository: (21 commits)
  config: fix sign comparison warnings
  config: move Git config parsing into "environment.c"
  config: remove unused `the_repository` wrappers
  config: drop `git_config_set_multivar()` wrapper
  config: drop `git_config_get_multivar_gently()` wrapper
  config: drop `git_config_set_multivar_in_file_gently()` wrapper
  config: drop `git_config_set_in_file_gently()` wrapper
  config: drop `git_config_set()` wrapper
  config: drop `git_config_set_gently()` wrapper
  config: drop `git_config_set_in_file()` wrapper
  config: drop `git_config_get_bool()` wrapper
  config: drop `git_config_get_ulong()` wrapper
  config: drop `git_config_get_int()` wrapper
  config: drop `git_config_get_string()` wrapper
  config: drop `git_config_get_string()` wrapper
  config: drop `git_config_get_string_multi()` wrapper
  config: drop `git_config_get_value()` wrapper
  config: drop `git_config_get_value()` wrapper
  config: drop `git_config_get()` wrapper
  config: drop `git_config_clear()` wrapper
  ...
</content>
</entry>
<entry>
<title>config: drop `git_config_get_bool()` wrapper</title>
<updated>2025-07-23T15:15:20Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-07-23T14:08:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5d215a7b3eb0a9a69c0cb9aa43dcae956a0aa03e'/>
<id>urn:sha1:5d215a7b3eb0a9a69c0cb9aa43dcae956a0aa03e</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_get_bool()`. All
callsites are adjusted so that they use
`repo_config_get_bool(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>Merge branch 'cb/daemon-reap-children'</title>
<updated>2025-07-21T16:14:28Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-07-21T16:14:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d80b7640b12496f86eb534460c7edfe1a5f1d79e'/>
<id>urn:sha1:d80b7640b12496f86eb534460c7edfe1a5f1d79e</id>
<content type='text'>
Futz with SIGCHLD handling in "git daemon".

* cb/daemon-reap-children:
  daemon: use sigaction() to install child_handler()
  compat/mingw: allow sigaction(SIGCHLD)
</content>
</entry>
<entry>
<title>daemon: use sigaction() to install child_handler()</title>
<updated>2025-07-10T21:19:57Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2025-07-10T19:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d83e1eef3bbf8cd85ce5ffc4afff3fbdfb006fd1'/>
<id>urn:sha1:d83e1eef3bbf8cd85ce5ffc4afff3fbdfb006fd1</id>
<content type='text'>
Replace signal() with an equivalent invocation of sigaction(), but
make sure to NOT set SA_RESTART so the original code that expects
to be interrupted when children complete still works as designed.

This change has the added benefit of using BSD signal semantics reliably
and therefore not needing the rearming call in the signal handler.

Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cb/daemon-retry-interrupted-accept'</title>
<updated>2025-07-07T21:12:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-07-07T21:12:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=844911960ca081ff827a688dbfdf95fdc191881d'/>
<id>urn:sha1:844911960ca081ff827a688dbfdf95fdc191881d</id>
<content type='text'>
When "git daemon" sees a signal while attempting to accept() a new
client, instead of retrying, it skipped it by mistake, which has
been corrected.

* cb/daemon-retry-interrupted-accept:
  daemon: correctly handle soft accept() errors in service_loop
</content>
</entry>
<entry>
<title>daemon: correctly handle soft accept() errors in service_loop</title>
<updated>2025-06-30T15:31:06Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2025-06-27T23:14:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=78b6601ca39015b7c6df9c5c323e9a7df74dee26'/>
<id>urn:sha1:78b6601ca39015b7c6df9c5c323e9a7df74dee26</id>
<content type='text'>
Since df076bdbcc ([PATCH] GIT: Listen on IPv6 as well, if available.,
2005-07-23), the original error checking was included in an inner loop
unchanged, where its effect was different.

Instead of retrying, after a EINTR during accept() in the listening
socket, it will advance to the next one and try with that instead,
leaving the client waiting for another round.

Make sure to retry with the same listener socket that failed originally.

To avoid an unlikely busy loop, fallback to the old behaviour after a
couple of attempts.

Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Acked-by: Phillip Wood &lt;phillip.wood@dunelm.org.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>daemon: remove unnecesary restriction for listener fd</title>
<updated>2025-06-26T15:35:08Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2025-06-26T09:51:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0c856224d202a7ad7ece25c77038ac3cafb7d56c'/>
<id>urn:sha1:0c856224d202a7ad7ece25c77038ac3cafb7d56c</id>
<content type='text'>
Since df076bdbcc ([PATCH] GIT: Listen on IPv6 as well, if available.,
2005-07-23), any file descriptor assigned to a listening socket was
validated to be within the range to be used in an FDSET later.

6573faff34 (NO_IPV6 support for git daemon, 2005-09-28), moves to
use poll() instead of select(), that doesn't have that restriction,
so remove the original check.

Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Acked-by: Phillip Wood &lt;phillip.wood123@gmail.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='https://git.shady.money/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>Merge branch 'bc/allow-upload-pack-from-other-people'</title>
<updated>2024-12-10T01:04:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-12-10T01:04:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=35f40385e441d5aa885f5aa813539d5ed9dc2d26'/>
<id>urn:sha1:35f40385e441d5aa885f5aa813539d5ed9dc2d26</id>
<content type='text'>
Loosen overly strict ownership check introduced in the recent past,
to keep the promise "cloning a suspicious repository is a safe
first step to inspect it".

* bc/allow-upload-pack-from-other-people:
  Allow cloning from repositories owned by another user
</content>
</entry>
<entry>
<title>daemon: fix type of `max_connections`</title>
<updated>2024-12-06T11:20:04Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2024-12-06T10:27:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7d200af27f41b8732dcb1a6c01ff73b7b7b0ecc1'/>
<id>urn:sha1:7d200af27f41b8732dcb1a6c01ff73b7b7b0ecc1</id>
<content type='text'>
The `max_connections` type tracks how many children git-daemon(1) would
spawn at the same time. This value can be controlled via a command line
switch: if given a positive value we'll set that up as the limit. But
when given either zero or a negative value we don't enforce any limit at
all.

But even when being passed a negative value we won't actually store it,
but normalize it to 0. Still, the variable used to store the config is
using a signed integer, which causes warnings when comparing the number
of accepted connections (`max_connections`) with the number of current
connections being handled (`live_children`).

Adapt the type of `max_connections` such that the types of both
variables match.

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