Commit Graph

78782 Commits (57da342c786f59eaeb436c18635cc1c7597733d9)

Author SHA1 Message Date
Junio C Hamano 57da342c78 The 25th batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-28 10:29:09 -07:00
Junio C Hamano fe95c55549 Merge branch 'ps/ci-rust'
CI improvements to handle the recent Rust integration better.

* ps/ci-rust:
  rust: support for Windows
  ci: verify minimum supported Rust version
  ci: check for common Rust mistakes via Clippy
  rust/varint: add safety comments
  ci: check formatting of our Rust code
  ci: deduplicate calls to `apt-get update`
2025-10-28 10:29:09 -07:00
Junio C Hamano 3deb97fe24 Merge branch 'cc/fast-import-strip-signed-tags'
"git fast-import" is taught to handle signed tags, just like it
recently learned to handle signed commits, in different ways.

* cc/fast-import-strip-signed-tags:
  fast-import: add '--signed-tags=<mode>' option
  fast-export: handle all kinds of tag signatures
  t9350: properly count annotated tags
  lib-gpg: allow tests with GPGSM or GPGSSH prereq first
  doc: git-tag: stop focusing on GPG signed tags
2025-10-28 10:29:09 -07:00
Junio C Hamano 54ac3809c3 Merge branch 'ds/sparse-checkout-clean'
"git sparse-checkout" subcommand learned a new "clean" action to
prune otherwise unused working-tree files that are outside the
areas of interest.

* ds/sparse-checkout-clean:
  sparse-index: improve advice message instructions
  t: expand tests around sparse merges and clean
  sparse-index: point users to new 'clean' action
  sparse-checkout: add --verbose option to 'clean'
  dir: add generic "walk all files" helper
  sparse-checkout: match some 'clean' behavior
  sparse-checkout: add basics of 'clean' command
  sparse-checkout: remove use of the_repository
2025-10-28 10:29:09 -07:00
Junio C Hamano 419c72cb8a Git 2.51.2
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4fA2sf7nIh/HeOzvsLXohpav5ssFAmj+4TIACgkQsLXohpav
 5svscw/+M/bCf9KO33uDLcWETGlM22OSa42Sxh7L+BWzI9YS3GVYOp0qRu4QFet+
 hB3XuNYtmeuVqXUw3OrvlK56oXPD9UocUgNLSCIxleuaY4RahHhCcsJxlcoJRWkb
 t6xv+2npAAdEBmjWa4OI62mK8O2wvs+m/aTA4Jtdx1Dg5XpZPRYwe8LY/e22hVt3
 KpxQ0QzLCjc/RJKHxslEpQYUoTOAsyVrS64n4hK4bQqrn4iyMBFuS7yWavTwu3V3
 Rl571hm71A2nxwbV2nVNnV1gyypL5z6F+19W9g1alBcefmGR5RnXmFO2twd2ufWK
 /oAEXx+zDbCaplz9BrvX+HdDv+YcBEMpYi1GQQEeEgYQ0t7ADPI7wnW/1UU8kEYl
 0AHgsaCeWbHPYdPWpIFGjXIxuoTmHL115Gj3IQPOakghfqVjnTor0DAZl8LpG8Co
 Lqr+G2+TP01/aEhxFy9jFfoibSftIvQNQbSbQ7wsjn0XfE2B/MqeZHOXsHDtxQX0
 YjSPfPAZWZNaC5lQ20V0B0FMiWJSNqIsTdXZmlJDT6n9E8oCWkI/Q4oHlzoZCOMH
 rZPAe67EP9MtIxgwmfntINVK0LryjxE72UyeR0bk6dmdJ+a15BnvjXl/Ad5MocVw
 Jht7gybYNKXfPMu08wBJ2VRFLbayDjteN2N5rarx9YeWPrvWY2o=
 =N5et
 -----END PGP SIGNATURE-----

Sync with Git 2.51.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-26 20:09:24 -07:00
Junio C Hamano bb5c624209 Git 2.51.2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-26 19:48:21 -07:00
Junio C Hamano b42b995d22 Merge branch 'so/t2401-use-test-path-helpers' into maint-2.51
Test modernization.

* so/t2401-use-test-path-helpers:
  t2401: update path checks using test_path helpers
2025-10-26 19:48:21 -07:00
Junio C Hamano 476b2407be Merge branch 'js/ci-github-actions-update' into maint-2.51
CI update.

* js/ci-github-actions-update:
  build(deps): bump actions/github-script from 7 to 8
  build(deps): bump actions/setup-python from 5 to 6
  build(deps): bump actions/checkout from 4 to 5
  build(deps): bump actions/download-artifact from 4 to 5
2025-10-26 19:48:20 -07:00
Junio C Hamano 3b9055c369 Merge branch 'kh/doc-continued-paragraph-fix' into maint-2.51
Doc mark-up fixes.

* kh/doc-continued-paragraph-fix:
  doc: fix accidental literal blocks
2025-10-26 19:48:20 -07:00
Junio C Hamano 4b67e53fd6 Merge branch 'js/unreachable-workaround-for-no-symlink-head' into maint-2.51
Code clean-up.

* js/unreachable-workaround-for-no-symlink-head:
  refs: forbid clang to complain about unreachable code
2025-10-26 19:48:20 -07:00
Junio C Hamano ed931ebe18 Merge branch 'ps/t7528-ssh-agent-uds-workaround' into maint-2.51
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
2025-10-26 19:48:20 -07:00
Junio C Hamano 2ad0fc2add Merge branch 'tb/unicode-width-table-17' into maint-2.51
Unicode width table update.

* tb/unicode-width-table-17:
  unicode: update the width tables to Unicode 17
2025-10-26 19:48:19 -07:00
Junio C Hamano 3d638cb389 Merge branch 'jk/status-z-short-fix' into maint-2.51
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
2025-10-26 19:48:19 -07:00
Junio C Hamano 2319fbae48 Merge branch 'jk/diff-no-index-with-pathspec-fix' into maint-2.51
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 '/'
2025-10-26 19:48:19 -07:00
Junio C Hamano 70b475f938 Merge branch 'ps/gitlab-ci-disable-windows-monitoring' into maint-2.51
Windows "real-time monitoring" interferes with the execution of
tests and affects negatively in both correctness and performance,
which has been disabled in Gitlab CI.

* ps/gitlab-ci-disable-windows-monitoring:
  gitlab-ci: disable realtime monitoring to unbreak Windows jobs
2025-10-26 19:48:19 -07:00
Junio C Hamano 306eb9ae56 Merge branch 'jc/diff-from-contents-fix' into maint-2.51
The code to squelch output from "git diff -w --name-status"
etc. for paths that "git diff -w -p" would have stayed silent
leaked output from dry-run patch generation, which has been
corrected.

* jc/diff-from-contents-fix:
  diff: make sure the other caller of diff_flush_patch_quietly() is silent
2025-10-26 19:48:18 -07:00
Junio C Hamano e56c419347 Merge branch 'jk/diff-from-contents-fix' into maint-2.51
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
2025-10-26 19:48:18 -07:00
Junio C Hamano 4e98b730f1 The twenty-fourth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-24 13:48:05 -07:00
Junio C Hamano 52b56e8b79 Merge branch 'ps/t7528-ssh-agent-uds-workaround'
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
2025-10-24 13:48:05 -07:00
Junio C Hamano 7d763b98ef Merge branch 'rs/add-patch-document-p-for-pager'
Show 'P'ipe command in "git add -p".

* rs/add-patch-document-p-for-pager:
  add-patch: fully document option P
2025-10-24 13:48:05 -07:00
Junio C Hamano 78bf9ce0d1 Merge branch 'jc/t1016-setup-fix'
GPG signing test set-up has been broken for a year, which has been
corrected.

* jc/t1016-setup-fix:
  t1016: make sure to use specified GPG
2025-10-24 13:48:05 -07:00
Junio C Hamano 503789c250 Merge branch 'tb/unicode-width-table-17'
Unicode width table update.

* tb/unicode-width-table-17:
  unicode: update the width tables to Unicode 17
2025-10-24 13:48:04 -07:00
Junio C Hamano 42737585fa Merge branch 'tu/credential-makefile-updates'
Build procedure for a few credential helpers (in contrib/) have
been updated.

* tu/credential-makefile-updates:
  contrib/credential: harmonize Makefiles
2025-10-24 13:48:04 -07:00
Junio C Hamano e7909b3a90 Merge branch 'jk/status-z-short-fix'
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
2025-10-24 13:48:04 -07:00
Junio C Hamano 385772e183 Merge branch 'js/t7500-pwd-windows-fix'
Test fix.

* js/t7500-pwd-windows-fix:
  t7500: fix tests with absolute path following ":(optional)" on Windows
2025-10-24 13:48:04 -07:00
Junio C Hamano 411903ce4c Merge branch 'rj/doc-technical-fixes'
Documentation mark-up fixes.

* rj/doc-technical-fixes:
  doc: add large-object-promisors.adoc to the docs build
  doc: commit-graph.adoc: fix up some formatting
  doc: sparse-checkout.adoc: fix asciidoc warnings
  doc: remembering-renames.adoc: fix asciidoc warnings
2025-10-24 13:48:04 -07:00
Junio C Hamano 1d10771264 The twenty-third batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-24 09:13:52 -07:00
Junio C Hamano 5139fce01f Merge branch 'jc/diff-from-contents-fix'
The code to squelch output from "git diff -w --name-status"
etc. for paths that "git diff -w -p" would have stayed silent
leaked output from dry-run patch generation, which has been
corrected.

* jc/diff-from-contents-fix:
  diff: make sure the other caller of diff_flush_patch_quietly() is silent
2025-10-24 09:10:37 -07:00
Junio C Hamano 88b3704ab1 Merge branch 'jk/diff-from-contents-fix'
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
2025-10-24 09:10:37 -07:00
Patrick Steinhardt b7fb2194b9 t7528: work around ETOOMANY in OpenSSH 10.1 and newer
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 <xry111@xry111.site>
Suggested-by: brian m. carlson <sandals@crustytoothpaste.net>
Helped-by: Jeff King <peff@peff.net>
Helped-by: Lauri Tirkkonen <lauri@hacktheplanet.fi>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-23 09:52:55 -07:00
Junio C Hamano 3da4413dbc diff: make sure the other caller of diff_flush_patch_quietly() is silent
Earlier, we added is a protection for the loop that computes "git
diff --quiet -w" to ensure calls to the diff_flush_patch_quietly()
helper stays quiet.  Do the same for another loop that deals with
options like "--name-status" to make calls to the same helper.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-23 09:05:28 -07:00
Junio C Hamano c54a18ef67 The twenty-second batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-22 11:38:59 -07:00
Junio C Hamano f3fac332c0 Merge branch 'so/t2401-use-test-path-helpers'
Test modernization.

* so/t2401-use-test-path-helpers:
  t2401: update path checks using test_path helpers
2025-10-22 11:38:58 -07:00
Junio C Hamano 0e746434e8 Merge branch 'je/doc-pull'
Documentation updates.

* je/doc-pull:
  doc: git-pull: clarify how to exit a conflicted merge
  doc: git-pull: delete the example
  doc: git-pull: clarify options for integrating remote branch
  doc: git-pull: move <repository> and <refspec> params
2025-10-22 11:38:58 -07:00
Junio C Hamano 98401c10fc Merge branch 'bc/sha1-256-interop-01'
The beginning of SHA1-SHA256 interoperability work.

* bc/sha1-256-interop-01:
  t1010: use BROKEN_OBJECTS prerequisite
  t: allow specifying compatibility hash
  fsck: consider gpgsig headers expected in tags
  rev-parse: allow printing compatibility hash
  docs: add documentation for loose objects
  docs: improve ambiguous areas of pack format documentation
  docs: reflect actual double signature for tags
  docs: update offset order for pack index v3
  docs: update pack index v3 format
2025-10-22 11:38:58 -07:00
Junio C Hamano c9ccf81948 Merge branch 'js/ci-github-actions-update'
CI update.

* js/ci-github-actions-update:
  build(deps): bump actions/github-script from 7 to 8
  build(deps): bump actions/setup-python from 5 to 6
  build(deps): bump actions/checkout from 4 to 5
  build(deps): bump actions/download-artifact from 4 to 5
2025-10-22 11:38:58 -07:00
René Scharfe 301e20da20 add-patch: fully document option P
Show option P in the prompt and explain it properly on a dedicated line
in online help and documentation.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-21 14:35:44 -07:00
Torsten Bögershausen 330a54099e unicode: update the width tables to Unicode 17
Unicode 17 is out. Update the unicode with table.

https://blog.unicode.org/2025/09/unicode-170-release-announcement.html
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-21 10:03:00 -07:00
Junio C Hamano 133d151831 The twenty-first batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-20 14:12:18 -07:00
Junio C Hamano 8329f6724b Merge branch 'tb/cat-file-objectmode-update'
Code clean-up.

* tb/cat-file-objectmode-update:
  builtin/cat-file.c: simplify calling `report_object_status()`
2025-10-20 14:12:18 -07:00
Junio C Hamano a23c82509f Merge branch 'kh/doc-continued-paragraph-fix'
Doc mark-up fixes.

* kh/doc-continued-paragraph-fix:
  doc: fix accidental literal blocks
2025-10-20 14:12:17 -07:00
Junio C Hamano 5a34f66fb9 Merge branch 'js/unreachable-workaround-for-no-symlink-head'
Code clean-up.

* js/unreachable-workaround-for-no-symlink-head:
  refs: forbid clang to complain about unreachable code
2025-10-20 14:12:17 -07:00
Junio C Hamano fc00bf0f9c Merge branch 'js/mingw-includes-cleanup'
Code clean-up.

* js/mingw-includes-cleanup:
  mingw: order `#include`s alphabetically
  mingw: avoid relative `#include`s
2025-10-20 14:12:17 -07:00
Junio C Hamano 29b0700515 Merge branch 'dk/stash-apply-index'
Doc update.

* dk/stash-apply-index:
  doc: explain the impact of stash.index on --autostash options
2025-10-20 14:12:17 -07:00
Thomas Uhle 9b8ff6dc9a contrib/credential: harmonize Makefiles
Update these Makefiles to be in line with other Makefiles from contrib
such as for contacts or subtree by making the following changes:

* Make the default settings after including config.mak.autogen and
  config.mak.
* Add the missing $(CPPFLAGS) to the compiler command as well as the
  missing $(CFLAGS) to the linker command.
* Use a pattern rule for compilation instead of a dedicated rule for
  each compile unit.
* Get rid of $(MAIN), $(SRCS) and $(OBJS) and simply use their values
  such as git-credential-libsecret and git-credential-libsecret.o.
* Strip @ from $(RM) to let the clean target rule be verbose.
* Define .PHONY for all special targets (all, clean).

Signed-off-by: Thomas Uhle <thomas.uhle@mailbox.tu-dresden.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-20 12:34:57 -07:00
Derrick Stolee c32aa72466 sparse-index: improve advice message instructions
When an on-disk sparse index is expanded to a full one, it could be
due to some worktree state that requires looking at file entries
hidden within sparse tree entries. This can be avoided if the
worktree is cleaned up and some other issues related to the index
state are resolved.

Expand the advice message to include all of these cases, since 'git
sparse-checkout clean' is not currently capable of handling all
cases.

In the future, we may improve the behavior of 'git sparse-checkout
clean' to handle all of the cases.

Helped-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-20 09:20:50 -07:00
Johannes Sixt 91e6a645e7 t7500: fix tests with absolute path following ":(optional)" on Windows
On Windows, the MSYS layer translates absolute path names generated by
a shell script from the POSIX style /c/dir/file to the Windows style
C:/dir/file form that is understood by git.exe. This happens only when
the absolute path stands on its own as a program argument or a value of
an environment variable.

The earlier commits 749d6d166d (config: values of pathname type can be
prefixed with :(optional), 2025-09-28) and ccfcaf399f (parseopt: values
of pathname type can be prefixed with :(optional), 2025-09-28) added
test cases where ":(optional)" is inserted before an absolute path.
$PWD is used to construct the absolute paths, which gives the POSIX
form, and the result is ":(optional)/c/dir/template". Such command line
arguments are no longer recognized as absolute paths and do not undergo
translation.

Existing test cases that expect that the specified file does not exist
are not incorrect (after all, git.exe will not find /c/dir/template).
Yet, they are conceptually incorrect. That the use of $PWD is erroneous
is revealed by a test case that expects that the optional file exists.
Since no such test case is present, add one. Use "$(pwd)" to generate
the absolute paths, so that the command line arguments become
":(optional)C:/dir/template".

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-20 09:16:49 -07:00
Jeff King 50927f4f68 status: make coloring of "-z --short" consistent
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 <Langbart@protonmail.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-17 14:30:42 -07:00
Junio C Hamano f229982df1 The twentieth batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-17 14:02:17 -07:00
Junio C Hamano e0fe91489f Merge branch 'jk/diff-no-index-with-pathspec-fix'
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 '/'
2025-10-17 14:02:17 -07:00