<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t, branch v2.51.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.51.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.51.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2025-10-27T02:48:21Z</updated>
<entry>
<title>Merge branch 'so/t2401-use-test-path-helpers' into maint-2.51</title>
<updated>2025-10-27T02:48:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-10-27T02:48:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b42b995d22bb2cf57be5cccb58e682117d5726a5'/>
<id>urn:sha1:b42b995d22bb2cf57be5cccb58e682117d5726a5</id>
<content type='text'>
Test modernization.

* so/t2401-use-test-path-helpers:
  t2401: update path checks using test_path helpers
</content>
</entry>
<entry>
<title>Merge branch 'ps/t7528-ssh-agent-uds-workaround' into maint-2.51</title>
<updated>2025-10-27T02:48:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-10-27T02:48:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ed931ebe1803bace248f02cb8b26f855baef4b5c'/>
<id>urn:sha1:ed931ebe1803bace248f02cb8b26f855baef4b5c</id>
<content type='text'>
Recent OpenSSH creates the Unix domain socket to communicate with
ssh-agent under $HOME instead of /tmp, which causes our test to
fail doe to overly long pathname in our test environment, which has
been worked around by using "ssh-agent -T".

* ps/t7528-ssh-agent-uds-workaround:
  t7528: work around ETOOMANY in OpenSSH 10.1 and newer
</content>
</entry>
<entry>
<title>Merge branch 'jk/status-z-short-fix' into maint-2.51</title>
<updated>2025-10-27T02:48:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-10-27T02:48:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3d638cb3892dcfccc22b3e7712b314fd83e2822d'/>
<id>urn:sha1:3d638cb3892dcfccc22b3e7712b314fd83e2822d</id>
<content type='text'>
The "--short" option of "git status" that meant output for humans
and "-z" option to show NUL delimited output format did not mix
well, and colored some but not all things.  The command has been
updated to color all elements consistently in such a case.

* jk/status-z-short-fix:
  status: make coloring of "-z --short" consistent
</content>
</entry>
<entry>
<title>Merge branch 'jk/diff-no-index-with-pathspec-fix' into maint-2.51</title>
<updated>2025-10-27T02:48:19Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-10-27T02:48:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2319fbae483f4c07bcdd9a850377a0cd21363cff'/>
<id>urn:sha1:2319fbae483f4c07bcdd9a850377a0cd21363cff</id>
<content type='text'>
An earlier addition to "git diff --no-index A B" to limit the
output with pathspec after the two directories misbehaved when
these directories were given with a trailing slash, which has been
corrected.

* jk/diff-no-index-with-pathspec-fix:
  diff --no-index: fix logic for paths ending in '/'
</content>
</entry>
<entry>
<title>Merge branch 'jk/diff-from-contents-fix' into maint-2.51</title>
<updated>2025-10-27T02:48:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-10-27T02:48:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e56c419347fa07bfc00b98fd70f4a4c526b75c8f'/>
<id>urn:sha1:e56c419347fa07bfc00b98fd70f4a4c526b75c8f</id>
<content type='text'>
Recently we attempted to improve "git diff -w" and friends to
handle cases where patch output would be suppressed, but it
introduced a bug that emits unnecessary output, which has been
corrected.

* jk/diff-from-contents-fix:
  diff: restore redirection to /dev/null for diff_from_contents
</content>
</entry>
<entry>
<title>t7528: work around ETOOMANY in OpenSSH 10.1 and newer</title>
<updated>2025-10-23T16:52:55Z</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2025-10-23T07:14:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b7fb2194b96604898ff1ddd8dd1a394aa71532a9'/>
<id>urn:sha1:b7fb2194b96604898ff1ddd8dd1a394aa71532a9</id>
<content type='text'>
In t7528 we spawn an SSH agent to verify that we can sign a commit via
it. This test has started to fail on some machines:

    +++ ssh-agent
    unix_listener_tmp: path "/home/pks/Development/git/build/test-output/trash directory.t7528-signed-commit-ssh/.ssh/agent/s.UTulegefEg.agent.UrPHumMXPq" too long for Unix domain socket
    main: Couldn't prepare agent socket

As it turns out this is caused by a change in OpenSSH 10.1 [1]:

 * ssh-agent(1), sshd(8): move agent listener sockets from /tmp to
   under ~/.ssh/agent for both ssh-agent(1) and forwarded sockets
   in sshd(8).

Instead of creating the socket in "/tmp", OpenSSH now creates the socket
in our home directory. And as the home directory gets modified to be
located in our test output directory we end up with paths that are
somewhat long. But Linux has a rather short limit of 108 characters for
socket paths, and other systems have even lower limits, so it is very
easy now to exceed the limit and run into the above error.

Work around the issue by using `ssh-agent -T`, which instructs it to
use the old behaviour and create the socket in "/tmp" again. This switch
has only been introduced with 10.1 though, so for older versions we have
to fall back to not using it. That's fine though, as older versions know
to put the socket into "/tmp" already.

An alternative approach would be to abbreviate the socket name itself so
that we create it as e.g. "sshsock" in the trash directory. But taking
the above example we'd still end up with a path that is 91 characters
long. So we wouldn't really have a lot of headroom, and it is quite
likely that some developers would see the issue on their machines.

[1]: https://www.openssh.com/txt/release-10.1

Reported-by: Xi Ruoyao &lt;xry111@xry111.site&gt;
Suggested-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Helped-by: Jeff King &lt;peff@peff.net&gt;
Helped-by: Lauri Tirkkonen &lt;lauri@hacktheplanet.fi&gt;
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>status: make coloring of "-z --short" consistent</title>
<updated>2025-10-17T21:30:42Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2025-10-17T08:44:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=50927f4f683a35ad1c76c8a02a1759a076d3f8f8'/>
<id>urn:sha1:50927f4f683a35ad1c76c8a02a1759a076d3f8f8</id>
<content type='text'>
When running "git status -z --short", the marker on modified index
entries (e.g., "M") is colorized, but the "??" marker for untracked
entries is not. Let's fix the "??" entries to show color here.

At first glance you might think that neither should be colorized, as
usually one would use "-z" to get machine-readable output. But this is a
tricky and unusual case. We have two output formats, "--short" and
"--porcelain" which are substantially similar, but differ in that
"--short" is for humans who want something short and "--porcelain" is
for machines. And "-z" by itself, without any other output option, does
default to "--porcelain", so "git status -z" will not colorize anything.

But if you explicitly ask for "-z" and "--short" together, then that is
asking for the human-readable output, but separated by NULs. This is
unlikely to be useful directly, but could for example be used if the
output will be shown to a human outside of the terminal. At any rate,
the current behavior is clearly wrong (since we colorize some things but
not others), and I think colorizing everything is the least-surprising
thing we can do here.

Reported-by: Langbart &lt;Langbart@protonmail.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>diff: restore redirection to /dev/null for diff_from_contents</title>
<updated>2025-10-17T18:41:50Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2025-10-17T08:36:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=623f7af28417805d941b1618157b9d93c02347af'/>
<id>urn:sha1:623f7af28417805d941b1618157b9d93c02347af</id>
<content type='text'>
In --quiet mode, since we produce only an exit code for "something was
changed" and no actual output, we can often get by with just a
tree-level diff. However, certain options require us to actually look at
the file contents (e.g., if we are ignoring whitespace changes). We have
a flag "diff_from_contents" for that, and if it is set we call
diff_flush() on each path.

To avoid producing any output (since we were asked to be --quiet), we
traditionally just redirected the output to /dev/null. That changed in
b55e6d36eb (diff: ensure consistent diff behavior with ignore options,
2025-08-08), which replaced that with a "dry_run" flag. In theory, with
dry_run set, we should produce no output. But it carries a risk of
regression: if we forget to respect dry_run in any of the output paths,
we'll accidentally produce output.

And indeed, there is at least one such regression in that commit, as it
covered only the case where we actually call into xdiff, and not
creation or deletion diffs, where we manually generate the headers. We
even test this case in t4035, but only with diff-tree, which does not
show the bug by default because it does not require diff_from_contents.
But git-diff does, because it allows external diff programs by default
(so we must dig into each diff filepair to decide if it requires running
an external diff that may declare two distinct blobs to actually be the
same).

We should fix all of those code paths to respect dry_run correctly, but
in the meantime we can protect ourselves more fully by restoring the
redirection to /dev/null. This gives us an extra layer of protection
against regressions dues to other code paths we've missed.

Though the original issue was reported with "git diff" (and due to its
default of --ext-diff), I've used "diff-tree -w" in the new test. It
triggers the same issue, but I think the fact that "-w" implies
diff_from_contents is a bit more obvious, and fits in with the rest of
t4035.

Reported-by: Jake Zimmerman &lt;jake@zimmerman.io&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>Merge branch 'ly/diff-name-only-with-diff-from-content' into jk/diff-from-contents-fix</title>
<updated>2025-10-17T18:40:15Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2025-10-17T18:40:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1e0a3e8f8f9e160b21fbe6f3f11a11dbed15fb4e'/>
<id>urn:sha1:1e0a3e8f8f9e160b21fbe6f3f11a11dbed15fb4e</id>
<content type='text'>
* ly/diff-name-only-with-diff-from-content:
  diff: ensure consistent diff behavior with ignore options
</content>
</entry>
<entry>
<title>t2401: update path checks using test_path helpers</title>
<updated>2025-10-15T20:38:04Z</updated>
<author>
<name>Solly</name>
<email>solobarine@gmail.com</email>
</author>
<published>2025-10-15T14:03:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0c4f1346ca57814a988be0846f9ec1560dea87dc'/>
<id>urn:sha1:0c4f1346ca57814a988be0846f9ec1560dea87dc</id>
<content type='text'>
Update old-style shell path checks to use the modern test
helpers 'test_path_is_file' and 'test_path_is_dir' for improved
runtime diagnosis.

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