<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/compat, branch v2.31.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.31.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.31.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-03-23T23:24:29Z</updated>
<entry>
<title>Sync with 2.30.3</title>
<updated>2022-03-23T23:24:29Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-03-17T09:57:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6a2381a3e5176b8deb69c799ed2b600366d36d39'/>
<id>urn:sha1:6a2381a3e5176b8deb69c799ed2b600366d36d39</id>
<content type='text'>
* maint-2.30:
  Git 2.30.3
  setup_git_directory(): add an owner check for the top-level directory
  Add a function to determine whether a path is owned by the current user
</content>
</entry>
<entry>
<title>Add a function to determine whether a path is owned by the current user</title>
<updated>2022-03-21T12:16:26Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-03-02T10:06:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bdc77d1d685be9c10b88abb281a42bc620548595'/>
<id>urn:sha1:bdc77d1d685be9c10b88abb281a42bc620548595</id>
<content type='text'>
This function will be used in the next commit to prevent
`setup_git_directory()` from discovering a repository in a directory
that is owned by someone other than the current user.

Note: We cannot simply use `st.st_uid` on Windows just like we do on
Linux and other Unix-like platforms: according to
https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/stat-functions
this field is always zero on Windows (because Windows' idea of a user ID
does not fit into a single numerical value). Therefore, we have to do
something a little involved to replicate the same functionality there.

Also note: On Windows, a user's home directory is not actually owned by
said user, but by the administrator. For all practical purposes, it is
under the user's control, though, therefore we pretend that it is owned
by the user.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>mingw: avoid fallback for {local,gm}time_r()</title>
<updated>2022-03-17T11:52:12Z</updated>
<author>
<name>Carlo Marcelo Arenas Belón</name>
<email>carenas@gmail.com</email>
</author>
<published>2021-11-27T10:15:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6e7ad1e4c22e7038975ba37c7413374fe566b064'/>
<id>urn:sha1:6e7ad1e4c22e7038975ba37c7413374fe566b064</id>
<content type='text'>
mingw-w64's pthread_unistd.h had a bug that mistakenly (because there is
no support for the *lockfile() functions required[1]) defined
_POSIX_THREAD_SAFE_FUNCTIONS and that was being worked around since
3ecd153a3b (compat/mingw: support MSys2-based MinGW build, 2016-01-14).

The bug was fixed in winphtreads, but as a side effect, leaves the
reentrant functions from time.h no longer visible and therefore breaks
the build.

Since the intention all along was to avoid using the fallback functions,
formalize the use of POSIX by setting the corresponding feature flag and
compile out the implementation for the fallback functions.

[1] https://unix.org/whitepapers/reentrant.html

Signed-off-by: Carlo Marcelo Arenas Belón &lt;carenas@gmail.com&gt;
Acked-by: Johannes Schindelin &lt;Johannes.Schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Sync with Git 2.30.2 for CVE-2021-21300</title>
<updated>2021-03-09T00:09:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-09T00:09:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=56a57652ef8e4ca2f108a8719b8caeed5e153c95'/>
<id>urn:sha1:56a57652ef8e4ca2f108a8719b8caeed5e153c95</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/open-returns-eintr'</title>
<updated>2021-03-04T23:34:45Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-04T23:34:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=921846fa22adb0abc3fb35e18c6be5feb5091cdd'/>
<id>urn:sha1:921846fa22adb0abc3fb35e18c6be5feb5091cdd</id>
<content type='text'>
Work around platforms whose open() is reported to return EINTR (it
shouldn't, as we do our signals with SA_RESTART).

* jk/open-returns-eintr:
  config.mak.uname: enable OPEN_RETURNS_EINTR for macOS Big Sur
  Makefile: add OPEN_RETURNS_EINTR knob
</content>
</entry>
<entry>
<title>Makefile: add OPEN_RETURNS_EINTR knob</title>
<updated>2021-02-26T22:15:51Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2021-02-26T06:14:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2b08101204066cc8221afb9029c07649f67da0a0'/>
<id>urn:sha1:2b08101204066cc8221afb9029c07649f67da0a0</id>
<content type='text'>
On some platforms, open() reportedly returns EINTR when opening regular
files and we receive a signal (usually SIGALRM from our progress meter).
This shouldn't happen, as open() should be a restartable syscall, and we
specify SA_RESTART when setting up the alarm handler. So it may actually
be a kernel or libc bug for this to happen. But it has been reported on
at least one version of Linux (on a network filesystem):

  https://lore.kernel.org/git/c8061cce-71e4-17bd-a56a-a5fed93804da@neanderfunk.de/

as well as on macOS starting with Big Sur even on a regular filesystem.

We can work around it by retrying open() calls that get EINTR, just as
we do for read(), etc. Since we don't ever _want_ to interrupt an open()
call, we can get away with just redefining open, rather than insisting
all callsites use xopen().

We actually do have an xopen() wrapper already (and it even does this
retry, though there's no indication of it being an observed problem back
then; it seems simply to have been lifted from xread(), etc). But it is
used hardly anywhere, and isn't suitable for general use because it will
die() on error. In theory we could combine the two, but it's awkward to
do so because of the variable-args interface of open().

This patch adds a Makefile knob for enabling the workaround. It's not
enabled by default for any platforms in config.mak.uname yet, as we
don't have enough data to decide how common this is (I have not been
able to reproduce on either Linux or Big Sur myself). It may be worth
enabling preemptively anyway, since the cost is pretty low (if we don't
see an EINTR, it's just an extra conditional).

However, note that we must not enable this on Windows. It doesn't do
anything there, and the macro overrides the existing mingw_open()
redirection. I've added a preemptive #undef here in the mingw header
(which is processed first) to just quietly disable it (we could also
make it an #error, but there is little point in being so aggressive).

Reported-by: Aleksey Kliger &lt;alklig@microsoft.com&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Sync with 2.29.3</title>
<updated>2021-02-12T14:51:12Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-12T14:51:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e4e68081bb811672b069eb1d6c97e57dd0764d51'/>
<id>urn:sha1:e4e68081bb811672b069eb1d6c97e57dd0764d51</id>
<content type='text'>
* maint-2.29:
  Git 2.29.3
  Git 2.28.1
  Git 2.27.1
  Git 2.26.3
  Git 2.25.5
  Git 2.24.4
  Git 2.23.4
  Git 2.22.5
  Git 2.21.4
  Git 2.20.5
  Git 2.19.6
  Git 2.18.5
  Git 2.17.6
  unpack_trees(): start with a fresh lstat cache
  run-command: invalidate lstat cache after a command finished
  checkout: fix bug that makes checkout follow symlinks in leading path
</content>
</entry>
<entry>
<title>Sync with 2.28.1</title>
<updated>2021-02-12T14:50:14Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-12T14:50:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d7bdabe52fbbde2ec1cbabdc8bdc737a8ead26aa'/>
<id>urn:sha1:d7bdabe52fbbde2ec1cbabdc8bdc737a8ead26aa</id>
<content type='text'>
* maint-2.28:
  Git 2.28.1
  Git 2.27.1
  Git 2.26.3
  Git 2.25.5
  Git 2.24.4
  Git 2.23.4
  Git 2.22.5
  Git 2.21.4
  Git 2.20.5
  Git 2.19.6
  Git 2.18.5
  Git 2.17.6
  unpack_trees(): start with a fresh lstat cache
  run-command: invalidate lstat cache after a command finished
  checkout: fix bug that makes checkout follow symlinks in leading path
</content>
</entry>
<entry>
<title>Sync with 2.27.1</title>
<updated>2021-02-12T14:50:09Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-12T14:50:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3f01e56686b2fd08d919306717764391409ac81e'/>
<id>urn:sha1:3f01e56686b2fd08d919306717764391409ac81e</id>
<content type='text'>
* maint-2.27:
  Git 2.27.1
  Git 2.26.3
  Git 2.25.5
  Git 2.24.4
  Git 2.23.4
  Git 2.22.5
  Git 2.21.4
  Git 2.20.5
  Git 2.19.6
  Git 2.18.5
  Git 2.17.6
  unpack_trees(): start with a fresh lstat cache
  run-command: invalidate lstat cache after a command finished
  checkout: fix bug that makes checkout follow symlinks in leading path
</content>
</entry>
<entry>
<title>Sync with 2.26.3</title>
<updated>2021-02-12T14:50:04Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2021-02-12T14:50:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2d1142a3e8455af1bdab2cb19dfaf428cdc03459'/>
<id>urn:sha1:2d1142a3e8455af1bdab2cb19dfaf428cdc03459</id>
<content type='text'>
* maint-2.26:
  Git 2.26.3
  Git 2.25.5
  Git 2.24.4
  Git 2.23.4
  Git 2.22.5
  Git 2.21.4
  Git 2.20.5
  Git 2.19.6
  Git 2.18.5
  Git 2.17.6
  unpack_trees(): start with a fresh lstat cache
  run-command: invalidate lstat cache after a command finished
  checkout: fix bug that makes checkout follow symlinks in leading path
</content>
</entry>
</feed>
