<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t, branch v2.31.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.31.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.31.2'/>
<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>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 'jt/clone-unborn-head'</title>
<updated>2021-03-19T22:25:38Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-19T22:25:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cc930b7472a4122e80d4333c82dfab852d39d2c1'/>
<id>urn:sha1:cc930b7472a4122e80d4333c82dfab852d39d2c1</id>
<content type='text'>
Test fix.

* jt/clone-unborn-head:
  t5606: run clone branch name test with protocol v2
</content>
</entry>
<entry>
<title>Merge branch 'jk/bisect-peel-tag-fix'</title>
<updated>2021-03-19T22:25:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-19T22:25:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=35381b13da846cc6ad620f9f9a5abf1d974d6e9b'/>
<id>urn:sha1:35381b13da846cc6ad620f9f9a5abf1d974d6e9b</id>
<content type='text'>
"git bisect" reimplemented more in C during 2.30 timeframe did not
take an annotated tag as a good/bad endpoint well.  This regression
has been corrected.

* jk/bisect-peel-tag-fix:
  bisect: peel annotated tags to commits
</content>
</entry>
<entry>
<title>Merge branch 'jc/calloc-fix'</title>
<updated>2021-03-19T22:25:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-19T22:25:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=eabacfd9cb58f22ffbacf935bf03747a08640fc7'/>
<id>urn:sha1:eabacfd9cb58f22ffbacf935bf03747a08640fc7</id>
<content type='text'>
Code clean-up.

* jc/calloc-fix:
  xcalloc: use CALLOC_ARRAY() when applicable
</content>
</entry>
<entry>
<title>bisect: peel annotated tags to commits</title>
<updated>2021-03-17T18:24:08Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2021-03-16T15:15:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7730f85594d4595605934e39d1d816ab663d8fa8'/>
<id>urn:sha1:7730f85594d4595605934e39d1d816ab663d8fa8</id>
<content type='text'>
This patch fixes a bug where git-bisect doesn't handle receiving
annotated tags as "git bisect good &lt;tag&gt;", etc. It's a regression in
27257bc466 (bisect--helper: reimplement `bisect_state` &amp; `bisect_head`
shell functions in C, 2020-10-15).

The original shell code called:

  sha=$(git rev-parse --verify "$rev^{commit}") ||
          die "$(eval_gettext "Bad rev input: \$rev")"

which will peel the input to a commit (or complain if that's not
possible). But the C code just calls get_oid(), which will yield the oid
of the tag.

The fix is to peel to a commit. The error message here is a little
non-idiomatic for Git (since it starts with a capital). I've mostly left
it, as it matches the other converted messages (like the "Bad rev input"
we print when get_oid() fails), though I did add an indication that it
was the peeling that was the problem. It might be worth taking a pass
through this converted code to modernize some of the error messages.

Note also that the test does a bare "grep" (not i18ngrep) on the
expected "X is the first bad commit" output message. This matches the
rest of the test script.

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>t5606: run clone branch name test with protocol v2</title>
<updated>2021-03-17T18:19:36Z</updated>
<author>
<name>Jonathan Tan</name>
<email>jonathantanmy@google.com</email>
</author>
<published>2021-03-17T15:42:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5f70859c1534417f93c2edcdb96a71db80492388'/>
<id>urn:sha1:5f70859c1534417f93c2edcdb96a71db80492388</id>
<content type='text'>
4f37d45706 ("clone: respect remote unborn HEAD", 2021-02-05) introduces
a new feature (if the remote has an unborn HEAD, e.g. when the remote
repository is empty, use it as the name of the branch) that only works
in protocol v2, but did not ensure that one of its tests always uses
protocol v2, and thus that test would fail if
GIT_TEST_PROTOCOL_VERSION=0 (or 1) is used. Therefore, add "-c
protocol.version=2" to the appropriate test.

(The rest of the tests from that commit have "-c protocol.version=2"
already added.)

Signed-off-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>xcalloc: use CALLOC_ARRAY() when applicable</title>
<updated>2021-03-16T00:51:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-15T22:05:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=486f4bd183b2b9e3355c7d0d47462951c659613d'/>
<id>urn:sha1:486f4bd183b2b9e3355c7d0d47462951c659613d</id>
<content type='text'>
These are for codebase before Git 2.31

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 'jt/transfer-fsck-across-packs-fix'</title>
<updated>2021-03-09T00:04:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-03-09T00:04:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6c46f864e5db7c88fdee1d67dcc20a4451a12ca2'/>
<id>urn:sha1:6c46f864e5db7c88fdee1d67dcc20a4451a12ca2</id>
<content type='text'>
The code to fsck objects received across multiple packs during a
single git fetch session has been broken when the packfile URI
feature was in use.  A workaround has been added by disabling the
codepath to avoid keeping a packfile that is too small.

* jt/transfer-fsck-across-packs-fix:
  fetch-pack: do not mix --pack_header and packfile uri
</content>
</entry>
</feed>
