<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat, branch v2.45.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.45.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.45.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-04-03T21:54:28Z</updated>
<entry>
<title>Win32: detect unix socket support at runtime</title>
<updated>2024-04-03T21:54:28Z</updated>
<author>
<name>Matthias Aßhauer</name>
<email>mha1993@live.de</email>
</author>
<published>2024-04-03T15:42:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2406bf5fc5fbaa042e05fc0001ba72beb888d60f'/>
<id>urn:sha1:2406bf5fc5fbaa042e05fc0001ba72beb888d60f</id>
<content type='text'>
Windows 10 build 17063 introduced support for unix sockets to Windows.
bb390b1 (git-compat-util: include declaration for unix sockets in
windows, 2021-09-14) introduced a way to build git with unix socket
support on Windows, but you still had to decide at build time which
Windows version the compiled executable was supposed to run on.

We can detect at runtime wether the operating system supports unix
sockets and act accordingly for all supported Windows versions.

This fixes https://github.com/git-for-windows/git/issues/3892

Signed-off-by: Matthias Aßhauer &lt;mha1993@live.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jc/no-include-of-compat-util-from-headers'</title>
<updated>2024-03-05T17:44:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-03-05T17:44:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=542d093b1d3411456603c9a539ab67b154e6f77f'/>
<id>urn:sha1:542d093b1d3411456603c9a539ab67b154e6f77f</id>
<content type='text'>
Header file clean-up.

* jc/no-include-of-compat-util-from-headers:
  compat: drop inclusion of &lt;git-compat-util.h&gt;
</content>
</entry>
<entry>
<title>compat: drop inclusion of &lt;git-compat-util.h&gt;</title>
<updated>2024-02-24T22:37:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-24T20:32:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2ca6c07db24fb6760ac38e3c7d45ee7b6c07f24e'/>
<id>urn:sha1:2ca6c07db24fb6760ac38e3c7d45ee7b6c07f24e</id>
<content type='text'>
These two header files are included from ordinary source files that
already include &lt;git-compat-util.h&gt; as the first header file as they
should.  There is no need to include the compat-util in these
headers.

"make hdr-check" is not affected, as it is designed to assume that
what &lt;git-compat-util.h&gt; offers is available to everybody without
being included.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/win32-retry-pipe-write-on-enospc' into maint-2.43</title>
<updated>2024-02-13T22:44:51Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-13T22:44:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8d792dcd5aa8a412670bd12f07cdc8290e3b9a68'/>
<id>urn:sha1:8d792dcd5aa8a412670bd12f07cdc8290e3b9a68</id>
<content type='text'>
Update to the code that writes to pipes on Windows.

* js/win32-retry-pipe-write-on-enospc:
  win32: special-case `ENOSPC` when writing to a pipe
</content>
</entry>
<entry>
<title>Merge branch 'en/header-cleanup' into maint-2.43</title>
<updated>2024-02-09T00:22:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-09T00:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0f7a10a3aad344a28f0f30b32a979925a9629533'/>
<id>urn:sha1:0f7a10a3aad344a28f0f30b32a979925a9629533</id>
<content type='text'>
Remove unused header "#include".

* en/header-cleanup:
  treewide: remove unnecessary includes in source files
  treewide: add direct includes currently only pulled in transitively
  trace2/tr2_tls.h: remove unnecessary include
  submodule-config.h: remove unnecessary include
  pkt-line.h: remove unnecessary include
  line-log.h: remove unnecessary include
  http.h: remove unnecessary include
  fsmonitor--daemon.h: remove unnecessary includes
  blame.h: remove unnecessary includes
  archive.h: remove unnecessary include
  treewide: remove unnecessary includes in source files
  treewide: remove unnecessary includes from header files
</content>
</entry>
<entry>
<title>Merge branch 'js/win32-retry-pipe-write-on-enospc'</title>
<updated>2024-02-06T22:31:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-06T22:31:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1f9d2745fab473fda916642e535e7922cda421ca'/>
<id>urn:sha1:1f9d2745fab473fda916642e535e7922cda421ca</id>
<content type='text'>
Update to the code that writes to pipes on Windows.

* js/win32-retry-pipe-write-on-enospc:
  win32: special-case `ENOSPC` when writing to a pipe
</content>
</entry>
<entry>
<title>win32: special-case `ENOSPC` when writing to a pipe</title>
<updated>2024-01-30T21:59:16Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2024-01-30T21:36:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=19ed0dff8f3f19fc15e79d188d7bcaadf26f2f11'/>
<id>urn:sha1:19ed0dff8f3f19fc15e79d188d7bcaadf26f2f11</id>
<content type='text'>
Since c6d3cce6f3c4 (pipe_command(): handle ENOSPC when writing to a
pipe, 2022-08-17), one `write()` call that results in an `errno` value
`ENOSPC` (which typically indicates out of disk space, which makes
little sense in the context of a pipe) is treated the same as `EAGAIN`.

However, contrary to expectations, as diagnosed in
https://github.com/python/cpython/issues/101881#issuecomment-1428667015,
when writing to a non-blocking pipe on Windows, an `errno` value of
`ENOSPC` means something else: the write _fails_. Completely. Because
more data was provided than the internal pipe buffer can handle.
Somewhat surprising, considering that `write()` is allowed to write less
than the specified amount, e.g. by writing only as much as fits in that
buffer. But it doesn't, it writes no byte at all in that instance.

Let's handle this by manually detecting when an `ENOSPC` indicates that
a pipe's buffer is smaller than what needs to be written, and re-try
using the pipe's buffer size as `size` parameter.

It would be plausible to try writing the entire buffer in a loop,
feeding pipe buffer-sized chunks, but experiments show that trying to
write more than one buffer-sized chunk right after that will immediately
fail because the buffer is unlikely to be drained as fast as `write()`
could write again. And the whole point of a non-blocking pipe is to be
non-blocking.

Which means that the logic that determines the pipe's buffer size
unfortunately has to be run potentially many times when writing large
amounts of data to a non-blocking pipe, as there is no elegant way to
cache that information between `write()` calls. It's the best we can do,
though, so it has to be good enough.

This fix is required to let t3701.60 (handle very large filtered diff)
pass with the MSYS2 runtime provided by the MSYS2 project: Without this
patch, the failed write would result in an infinite loop. This patch is
not required with Git for Windows' variant of the MSYS2 runtime only
because Git for Windows added an ugly work-around specifically to avoid
a hang in that test case.

The diff is slightly chatty because it extends an already-existing
conditional that special-cases a _different_ `errno` value for pipes,
and because this patch needs to account for the fact that
`_get_osfhandle()` potentially overwrites `errno`.

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>Merge branch 'sk/mingw-owner-check-error-message-improvement'</title>
<updated>2024-01-19T23:04:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-01-19T23:04:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b5fb62354213384d5f443c2cd835670407a3a2da'/>
<id>urn:sha1:b5fb62354213384d5f443c2cd835670407a3a2da</id>
<content type='text'>
In addition to (rather cryptic) Security Identifiers, show username
and domain in the error message when we barf on mismatch between
the Git directory and the current user on Windows.

* sk/mingw-owner-check-error-message-improvement:
  mingw: give more details about unsafe directory's ownership
</content>
</entry>
<entry>
<title>mingw: give more details about unsafe directory's ownership</title>
<updated>2024-01-10T16:23:30Z</updated>
<author>
<name>Sören Krecker</name>
<email>soekkle@freenet.de</email>
</author>
<published>2024-01-08T17:38:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f755e092e8bf22e7bf3599d59a6a7fa562f6b61b'/>
<id>urn:sha1:f755e092e8bf22e7bf3599d59a6a7fa562f6b61b</id>
<content type='text'>
Add domain/username in error message, if owner sid of repository and
user sid are not equal on windows systems.

Old error message:
'''
fatal: detected dubious ownership in repository at 'C:/Users/test/source/repos/git'
'C:/Users/test/source/repos/git' is owned by:
	'S-1-5-21-571067702-4104414259-3379520149-500'
but the current user is:
	'S-1-5-21-571067702-4104414259-3379520149-1001'
To add an exception for this directory, call:

	git config --global --add safe.directory C:/Users/test/source/repos/git
'''

New error message:
'''
fatal: detected dubious ownership in repository at 'C:/Users/test/source/repos/git'
'C:/Users/test/source/repos/git' is owned by:
        DESKTOP-L78JVA6/Administrator (S-1-5-21-571067702-4104414259-3379520149-500)
but the current user is:
        DESKTOP-L78JVA6/test (S-1-5-21-571067702-4104414259-3379520149-1001)
To add an exception for this directory, call:

        git config --global --add safe.directory C:/Users/test/source/repos/git
'''

Signed-off-by: Sören Krecker &lt;soekkle@freenet.de&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'en/header-cleanup'</title>
<updated>2024-01-08T22:05:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-01-08T22:05:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=492ee03f60297e7e83d101f4519ab8abc98782bc'/>
<id>urn:sha1:492ee03f60297e7e83d101f4519ab8abc98782bc</id>
<content type='text'>
Remove unused header "#include".

* en/header-cleanup:
  treewide: remove unnecessary includes in source files
  treewide: add direct includes currently only pulled in transitively
  trace2/tr2_tls.h: remove unnecessary include
  submodule-config.h: remove unnecessary include
  pkt-line.h: remove unnecessary include
  line-log.h: remove unnecessary include
  http.h: remove unnecessary include
  fsmonitor--daemon.h: remove unnecessary includes
  blame.h: remove unnecessary includes
  archive.h: remove unnecessary include
  treewide: remove unnecessary includes in source files
  treewide: remove unnecessary includes from header files
</content>
</entry>
</feed>
