<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t, branch v2.34.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.34.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.34.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-03-23T23:31:36Z</updated>
<entry>
<title>Sync with 2.33.2</title>
<updated>2022-03-23T23:31:36Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-03-17T09:57:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=93fbff09eb8ed9e728a61623a15a53a46a762639'/>
<id>urn:sha1:93fbff09eb8ed9e728a61623a15a53a46a762639</id>
<content type='text'>
* maint-2.33:
  Git 2.33.2
  Git 2.32.1
  Git 2.31.2
  GIT-VERSION-GEN: bump to v2.33.1
  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>Sync with 2.32.1</title>
<updated>2022-03-23T23:31:32Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-03-17T09:57:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=303b876f76c2caccc9a289c4f14a2b2d3850684e'/>
<id>urn:sha1:303b876f76c2caccc9a289c4f14a2b2d3850684e</id>
<content type='text'>
* maint-2.32:
  Git 2.32.1
  Git 2.31.2
  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>Sync with 2.31.2</title>
<updated>2022-03-23T23:31:28Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-03-17T09:57:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=201b0c7af6cad52cf6f0cfc46bd48201a23f6224'/>
<id>urn:sha1:201b0c7af6cad52cf6f0cfc46bd48201a23f6224</id>
<content type='text'>
* maint-2.31:
  Git 2.31.2
  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>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>Fix `GIT_CEILING_DIRECTORIES` with `C:\` and the likes</title>
<updated>2022-03-23T23:21:08Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-03-23T22:00:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fdcad5a53e14bd397e4fa323e7fd0c3bf16dd373'/>
<id>urn:sha1:fdcad5a53e14bd397e4fa323e7fd0c3bf16dd373</id>
<content type='text'>
When determining the length of the longest ancestor of a given path with
respect to to e.g. `GIT_CEILING_DIRECTORIES`, we special-case the root
directory by returning 0 (i.e. we pretend that the path `/` does not end
in a slash by virtually stripping it).

That is the correct behavior because when normalizing paths, the root
directory is special: all other directory paths have their trailing
slash stripped, but not the root directory's path (because it would
become the empty string, which is not a legal path).

However, this special-casing of the root directory in
`longest_ancestor_length()` completely forgets about Windows-style root
directories, e.g. `C:\`. These _also_ get normalized with a trailing
slash (because `C:` would actually refer to the current directory on
that drive, not necessarily to its root directory).

In fc56c7b34b (mingw: accomodate t0060-path-utils for MSYS2,
2016-01-27), we almost got it right. We noticed that
`longest_ancestor_length()` expects a slash _after_ the matched prefix,
and if the prefix already ends in a slash, the normalized path won't
ever match and -1 is returned.

But then that commit went astray: The correct fix is not to adjust the
_tests_ to expect an incorrect -1 when that function is fed a prefix
that ends in a slash, but instead to treat such a prefix as if the
trailing slash had been removed.

Likewise, that function needs to handle the case where it is fed a path
that ends in a slash (not only a prefix that ends in a slash): if it
matches the prefix (plus trailing slash), we still need to verify that
the path does not end there, otherwise the prefix is not actually an
ancestor of the path but identical to it (and we need to return -1 in
that case).

With these two adjustments, we no longer need to play games in t0060
where we only add `$rootoff` if the passed prefix is different from the
MSYS2 pseudo root, instead we also add it for the MSYS2 pseudo root
itself. We do have to be careful to skip that logic entirely for Windows
paths, though, because they do are not subject to that MSYS2 pseudo root
treatment.

This patch fixes the scenario where a user has set
`GIT_CEILING_DIRECTORIES=C:\`, which would be ignored otherwise.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ds/add-rm-with-sparse-index' into maint</title>
<updated>2021-11-23T22:48:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-11-23T22:48:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eef0a8e7c1ea6987fe2a6acaf21f612d66974aff'/>
<id>urn:sha1:eef0a8e7c1ea6987fe2a6acaf21f612d66974aff</id>
<content type='text'>
Regression fix for 2.34

* ds/add-rm-with-sparse-index:
  dir: revert "dir: select directories correctly"
</content>
</entry>
<entry>
<title>Merge branch 'ev/pull-already-up-to-date-is-noop' into maint</title>
<updated>2021-11-23T22:48:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-11-23T22:48:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad03180c5cf233b2de6b7e3388d96d2126d7a5d9'/>
<id>urn:sha1:ad03180c5cf233b2de6b7e3388d96d2126d7a5d9</id>
<content type='text'>
"git pull" with any strategy when the other side is behind us
should succeed as it is a no-op, but doesn't.

* ev/pull-already-up-to-date-is-noop:
  pull: should be noop when already-up-to-date
</content>
</entry>
<entry>
<title>Merge branch 'hm/paint-hits-in-log-grep' into maint</title>
<updated>2021-11-23T22:48:00Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-11-23T22:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a650ff5aecf4be98c78ccfcae388a8d4029a46cf'/>
<id>urn:sha1:a650ff5aecf4be98c78ccfcae388a8d4029a46cf</id>
<content type='text'>
"git grep" looking in a blob that has non-UTF8 payload was
completely broken when linked with versions of PCREv2 library older
than 10.34 in the latest release.

* hm/paint-hits-in-log-grep:
  Revert "grep/pcre2: fix an edge case concerning ascii patterns and UTF-8 data"
</content>
</entry>
<entry>
<title>dir: revert "dir: select directories correctly"</title>
<updated>2021-11-22T22:53:23Z</updated>
<author>
<name>Derrick Stolee</name>
<email>dstolee@microsoft.com</email>
</author>
<published>2021-11-19T14:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=33c5d6c8456ecb1e89450483586f5f3f115ffa93'/>
<id>urn:sha1:33c5d6c8456ecb1e89450483586f5f3f115ffa93</id>
<content type='text'>
This reverts commit f6526728f950cacfd5b5e42bcc65f2c47f3da654.

The change in f652672 (dir: select directories correctly, 2021-09-24)
caused a regression in directory-based matches with non-cone-mode
patterns, especially for .gitignore patterns. A test is included to
prevent this regression in the future.

The commit ed495847 (dir: fix pattern matching on dirs, 2021-09-24) was
reverted in 5ceb663 (dir: fix directory-matching bug, 2021-11-02) for
similar reasons. Neither commit changed tests, and tests added later in
the series continue to pass when these commits are reverted.

Reported-by: Danial Alihosseini &lt;danial.alihosseini@gmail.com&gt;
Signed-off-by: Derrick Stolee &lt;dstolee@microsoft.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Revert "grep/pcre2: fix an edge case concerning ascii patterns and UTF-8 data"</title>
<updated>2021-11-19T17:10:27Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-11-19T17:06:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e7f3925bed86edf1b79fd18e5600252e445019d1'/>
<id>urn:sha1:e7f3925bed86edf1b79fd18e5600252e445019d1</id>
<content type='text'>
This reverts commit ae39ba431ab861548eb60b4bd2e1d8b8813db76f, as it
breaks "grep" when looking for a string in non UTF-8 haystack, when
linked with certain versions of PCREv2 library.

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