]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
2 days agodiff: update the way rewrite diff handles incomplete lines
Junio C Hamano [Wed, 5 Nov 2025 21:30:47 +0000 (13:30 -0800)] 
diff: update the way rewrite diff handles incomplete lines

The diff_symbol based output framework uses one DIFF_SYMBOL_* enum
value per the kind of output lines of "git diff", which corresponds
to one output line from the xdiff machinery used internally.  Most
notably, DIFF_SYMBOL_PLUS and DIFF_SYMBOL_MINUS that correspond to
"+" and "-" lines are designed to always take a complete line, even
if the output from xdiff machinery may produce "\ No newline at the
end of file" immediately after them.

But this is not true in the rewrite-diff codepath, which completely
bypasses the xdiff machinery.  Since the code path feeds the bytes
directly from the payload to the output routines, the output layer
has to deal with an incomplete line with DIFF_SYMBOL_PLUS and
DIFF_SYMBOL_MINUS, which never would see an incomplete line in the
normal code paths.  This lack of final newline is compensated by an
ugly hack for a fabricated DIFF_SYMBOL_NO_LF_EOF token to inject an
extra newline to the output to simulate output coming from the xdiff
machinery.

Revamp the way the complete-rewrite code path feeds the lines to the
output layer by treating the last line of the pre/post image when it
is an incomplete line specially.

This lets us remove the DIFF_SYMBOL_NO_LF_EOF hack and use the usual
DIFF_SYMBOL_CONTEXT_INCOMPLETE code path, which will later learn how
to handle whitespace errors.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 days agodiff: call emit_callback ecbdata everywhere
Junio C Hamano [Wed, 5 Nov 2025 21:30:46 +0000 (13:30 -0800)] 
diff: call emit_callback ecbdata everywhere

Everybody else, except for emit_rewrite_lines(), calls the
emit_callback data ecbdata.  Make sure we call the same thing by
the same name for consistency.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 days agodiff: refactor output of incomplete line
Junio C Hamano [Wed, 5 Nov 2025 21:30:45 +0000 (13:30 -0800)] 
diff: refactor output of incomplete line

Create a helper function that reacts to "\ No newline at the end of
file" in preparation for unifying the incomplete line handling in
the code path that handles xdiff output and the code path that
bypasses xdiff and produces complete rewrite patch.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 days agodiff: fix incorrect counting of line numbers
Junio C Hamano [Wed, 5 Nov 2025 21:30:44 +0000 (13:30 -0800)] 
diff: fix incorrect counting of line numbers

The "\ No newline at the end of the file" can come after any of the
"-" (deleted preimage line), " " (unchanged line), or "+" (added
postimage line).  Incrementing only the preimage line number upon
seeing it does not make any sense.

We can keep track of what the previous line was, and increment
lno_in_{pre,post}image variables properly, like this patch does.  I
do not think it matters, as these numbers are used only to compare
them with blank_at_eof_in_{pre,post}image to issue the warning every
time we see an added line, but by definition, after we see "\ No
newline at the end of the file" for an added line, we will not see
an added line for the file.

Keeping track of what the last line was (in other words, "is it that
the file used to end in an incomplete line?  The file ends in an
incomplete line after the change?  Both the file before and after
the change ends in an incomplete line that did not change?") will be
independently useful.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 days agodiff: correct suppress_blank_empty hack
Junio C Hamano [Wed, 5 Nov 2025 21:30:43 +0000 (13:30 -0800)] 
diff: correct suppress_blank_empty hack

The suppress-blank-empty feature abused the CONTEXT_INCOMPLETE
symbol that was meant to be used only for "\ No newline at the end
of file" code path.

The intent of the feature was to turn a context line we receive from
xdiff machinery (which always uses ' ' for context lines, even an
empty one) and spit it out as a truly empty line.

Perform such a conversion very locally at where a line from xdiff
that begins with ' ' is handled for output; there are many checks
before the control reaches such place that checks the first letter
of the diff output line to see if it is a context line, and having
to check for '\n' and treat it as a special case is error prone.

In order to catch similar hacks in the future, make sure the code
path that is meant for "\ No newline" case checks the first byte is
indeed a backslash.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 days agodiff: emit_line_ws_markup() if/else style fix
Junio C Hamano [Wed, 5 Nov 2025 21:30:42 +0000 (13:30 -0800)] 
diff: emit_line_ws_markup() if/else style fix

Apply the simple rule: if you need {} in one arm of the if/else
if/else... cascade, have {} in all of them.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 days agowhitespace: correct bit assignment comments
Junio C Hamano [Wed, 5 Nov 2025 21:30:41 +0000 (13:30 -0800)] 
whitespace: correct bit assignment comments

A comment in diff.c claimed that bits up to 12th (counting from 0th)
are whitespace rules, and 13th thru 15th are for new/old/context,
but it turns out it was miscounting.  Correct them, and clarify
where the whitespace rule bits come from in the comment.  Extend bit
assignment comments to cover bits used for color-moved, which
weren't described.

Also update the way these bit constants are defined to use (1 << N)
notation, instead of octal constants, as it tends to make it easier
to notice a breakage like this.

Sprinkle a few blank lines between logically distinct groups of CPP
macro definitions to make them easier to read.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 days agoSync with Git 2.51.2
Junio C Hamano [Mon, 27 Oct 2025 03:05:40 +0000 (20:05 -0700)] 
Sync with Git 2.51.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 days agoGit 2.51.2 maint v2.51.2
Junio C Hamano [Mon, 27 Oct 2025 00:47:52 +0000 (17:47 -0700)] 
Git 2.51.2

Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 days agoMerge branch 'so/t2401-use-test-path-helpers' into maint-2.51
Junio C Hamano [Mon, 27 Oct 2025 02:48:21 +0000 (19:48 -0700)] 
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

11 days agoMerge branch 'js/ci-github-actions-update' into maint-2.51
Junio C Hamano [Mon, 27 Oct 2025 02:48:20 +0000 (19:48 -0700)] 
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

11 days agoMerge branch 'kh/doc-continued-paragraph-fix' into maint-2.51
Junio C Hamano [Mon, 27 Oct 2025 02:48:20 +0000 (19:48 -0700)] 
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

11 days agoMerge branch 'js/unreachable-workaround-for-no-symlink-head' into maint-2.51
Junio C Hamano [Mon, 27 Oct 2025 02:48:20 +0000 (19:48 -0700)] 
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

11 days agoMerge branch 'ps/t7528-ssh-agent-uds-workaround' into maint-2.51
Junio C Hamano [Mon, 27 Oct 2025 02:48:20 +0000 (19:48 -0700)] 
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

11 days agoMerge branch 'tb/unicode-width-table-17' into maint-2.51
Junio C Hamano [Mon, 27 Oct 2025 02:48:19 +0000 (19:48 -0700)] 
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

11 days agoMerge branch 'jk/status-z-short-fix' into maint-2.51
Junio C Hamano [Mon, 27 Oct 2025 02:48:19 +0000 (19:48 -0700)] 
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

11 days agoMerge branch 'jk/diff-no-index-with-pathspec-fix' into maint-2.51
Junio C Hamano [Mon, 27 Oct 2025 02:48:19 +0000 (19:48 -0700)] 
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 '/'

11 days agoMerge branch 'ps/gitlab-ci-disable-windows-monitoring' into maint-2.51
Junio C Hamano [Mon, 27 Oct 2025 02:48:18 +0000 (19:48 -0700)] 
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

11 days agoMerge branch 'jc/diff-from-contents-fix' into maint-2.51
Junio C Hamano [Mon, 27 Oct 2025 02:48:18 +0000 (19:48 -0700)] 
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

11 days agoMerge branch 'jk/diff-from-contents-fix' into maint-2.51
Junio C Hamano [Mon, 27 Oct 2025 02:48:18 +0000 (19:48 -0700)] 
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

2 weeks agoThe twenty-fourth batch
Junio C Hamano [Fri, 24 Oct 2025 20:47:53 +0000 (13:47 -0700)] 
The twenty-fourth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoMerge branch 'ps/t7528-ssh-agent-uds-workaround'
Junio C Hamano [Fri, 24 Oct 2025 20:48:05 +0000 (13:48 -0700)] 
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

2 weeks agoMerge branch 'rs/add-patch-document-p-for-pager'
Junio C Hamano [Fri, 24 Oct 2025 20:48:05 +0000 (13:48 -0700)] 
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

2 weeks agoMerge branch 'jc/t1016-setup-fix'
Junio C Hamano [Fri, 24 Oct 2025 20:48:05 +0000 (13:48 -0700)] 
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

2 weeks agoMerge branch 'tb/unicode-width-table-17'
Junio C Hamano [Fri, 24 Oct 2025 20:48:04 +0000 (13:48 -0700)] 
Merge branch 'tb/unicode-width-table-17'

Unicode width table update.

* tb/unicode-width-table-17:
  unicode: update the width tables to Unicode 17

2 weeks agoMerge branch 'tu/credential-makefile-updates'
Junio C Hamano [Fri, 24 Oct 2025 20:48:04 +0000 (13:48 -0700)] 
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

2 weeks agoMerge branch 'jk/status-z-short-fix'
Junio C Hamano [Fri, 24 Oct 2025 20:48:04 +0000 (13:48 -0700)] 
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

2 weeks agoMerge branch 'js/t7500-pwd-windows-fix'
Junio C Hamano [Fri, 24 Oct 2025 20:48:04 +0000 (13:48 -0700)] 
Merge branch 'js/t7500-pwd-windows-fix'

Test fix.

* js/t7500-pwd-windows-fix:
  t7500: fix tests with absolute path following ":(optional)" on Windows

2 weeks agoMerge branch 'rj/doc-technical-fixes'
Junio C Hamano [Fri, 24 Oct 2025 20:48:04 +0000 (13:48 -0700)] 
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

2 weeks agoThe twenty-third batch
Junio C Hamano [Fri, 24 Oct 2025 16:13:52 +0000 (09:13 -0700)] 
The twenty-third batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoMerge branch 'jc/diff-from-contents-fix'
Junio C Hamano [Fri, 24 Oct 2025 16:10:37 +0000 (09:10 -0700)] 
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

2 weeks agoMerge branch 'jk/diff-from-contents-fix'
Junio C Hamano [Fri, 24 Oct 2025 16:10:37 +0000 (09:10 -0700)] 
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

2 weeks agot7528: work around ETOOMANY in OpenSSH 10.1 and newer
Patrick Steinhardt [Thu, 23 Oct 2025 07:14:59 +0000 (09:14 +0200)] 
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>
2 weeks agodiff: make sure the other caller of diff_flush_patch_quietly() is silent
Junio C Hamano [Wed, 22 Oct 2025 17:39:12 +0000 (10:39 -0700)] 
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>
2 weeks agoThe twenty-second batch
Junio C Hamano [Wed, 22 Oct 2025 18:38:46 +0000 (11:38 -0700)] 
The twenty-second batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoMerge branch 'so/t2401-use-test-path-helpers'
Junio C Hamano [Wed, 22 Oct 2025 18:38:58 +0000 (11:38 -0700)] 
Merge branch 'so/t2401-use-test-path-helpers'

Test modernization.

* so/t2401-use-test-path-helpers:
  t2401: update path checks using test_path helpers

2 weeks agoMerge branch 'je/doc-pull'
Junio C Hamano [Wed, 22 Oct 2025 18:38:58 +0000 (11:38 -0700)] 
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

2 weeks agoMerge branch 'bc/sha1-256-interop-01'
Junio C Hamano [Wed, 22 Oct 2025 18:38:58 +0000 (11:38 -0700)] 
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

2 weeks agoMerge branch 'js/ci-github-actions-update'
Junio C Hamano [Wed, 22 Oct 2025 18:38:58 +0000 (11:38 -0700)] 
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

2 weeks agoadd-patch: fully document option P
René Scharfe [Tue, 21 Oct 2025 18:02:53 +0000 (20:02 +0200)] 
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>
2 weeks agounicode: update the width tables to Unicode 17
Torsten Bögershausen [Tue, 21 Oct 2025 09:48:49 +0000 (11:48 +0200)] 
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>
2 weeks agoThe twenty-first batch
Junio C Hamano [Mon, 20 Oct 2025 21:11:52 +0000 (14:11 -0700)] 
The twenty-first batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2 weeks agoMerge branch 'tb/cat-file-objectmode-update'
Junio C Hamano [Mon, 20 Oct 2025 21:12:18 +0000 (14:12 -0700)] 
Merge branch 'tb/cat-file-objectmode-update'

Code clean-up.

* tb/cat-file-objectmode-update:
  builtin/cat-file.c: simplify calling `report_object_status()`

2 weeks agoMerge branch 'kh/doc-continued-paragraph-fix'
Junio C Hamano [Mon, 20 Oct 2025 21:12:17 +0000 (14:12 -0700)] 
Merge branch 'kh/doc-continued-paragraph-fix'

Doc mark-up fixes.

* kh/doc-continued-paragraph-fix:
  doc: fix accidental literal blocks

2 weeks agoMerge branch 'js/unreachable-workaround-for-no-symlink-head'
Junio C Hamano [Mon, 20 Oct 2025 21:12:17 +0000 (14:12 -0700)] 
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

2 weeks agoMerge branch 'js/mingw-includes-cleanup'
Junio C Hamano [Mon, 20 Oct 2025 21:12:17 +0000 (14:12 -0700)] 
Merge branch 'js/mingw-includes-cleanup'

Code clean-up.

* js/mingw-includes-cleanup:
  mingw: order `#include`s alphabetically
  mingw: avoid relative `#include`s

2 weeks agoMerge branch 'dk/stash-apply-index'
Junio C Hamano [Mon, 20 Oct 2025 21:12:17 +0000 (14:12 -0700)] 
Merge branch 'dk/stash-apply-index'

Doc update.

* dk/stash-apply-index:
  doc: explain the impact of stash.index on --autostash options

2 weeks agocontrib/credential: harmonize Makefiles
Thomas Uhle [Mon, 20 Oct 2025 18:20:22 +0000 (20:20 +0200)] 
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>
2 weeks agot7500: fix tests with absolute path following ":(optional)" on Windows
Johannes Sixt [Mon, 20 Oct 2025 09:40:08 +0000 (11:40 +0200)] 
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>
3 weeks agostatus: make coloring of "-z --short" consistent
Jeff King [Fri, 17 Oct 2025 08:44:55 +0000 (04:44 -0400)] 
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>
3 weeks agoThe twentieth batch
Junio C Hamano [Fri, 17 Oct 2025 21:02:03 +0000 (14:02 -0700)] 
The twentieth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agoMerge branch 'jk/diff-no-index-with-pathspec-fix'
Junio C Hamano [Fri, 17 Oct 2025 21:02:17 +0000 (14:02 -0700)] 
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 '/'

3 weeks agoMerge branch 'tb/doc-submitting-patches'
Junio C Hamano [Fri, 17 Oct 2025 21:02:17 +0000 (14:02 -0700)] 
Merge branch 'tb/doc-submitting-patches'

A few more things that patch authors can do to help maintainer to
keep track of their topics better.

* tb/doc-submitting-patches:
  SubmittingPatches: guidance for multi-series efforts
  SubmittingPatches: extend release-notes experiment to topic names

3 weeks agoMerge branch 'rs/add-patch-options-fix'
Junio C Hamano [Fri, 17 Oct 2025 21:02:17 +0000 (14:02 -0700)] 
Merge branch 'rs/add-patch-options-fix'

The code in "git add -p" and friends to iterate over hunks was
riddled with bugs, which has been corrected.

* rs/add-patch-options-fix:
  add-patch: reset "permitted" at loop start
  add-patch: let options a and d roll over like y and n
  add-patch: let options k and K roll over like j and J
  add-patch: let options y, n, j, and e roll over to next undecided
  add-patch: document that option J rolls over
  add-patch: improve help for options j, J, k, and K

3 weeks agoMerge branch 'en/make-libgit-a'
Junio C Hamano [Fri, 17 Oct 2025 21:02:16 +0000 (14:02 -0700)] 
Merge branch 'en/make-libgit-a'

Instead of three library archives (one for git, one for reftable,
and one for xdiff), roll everything into a single libgit.a archive.
This would help later effort to FFI into Rust.

* en/make-libgit-a:
  make: delete REFTABLE_LIB, add reftable to LIB_OBJS
  make: delete XDIFF_LIB, add xdiff to LIB_OBJS

3 weeks agodiff: restore redirection to /dev/null for diff_from_contents
Jeff King [Fri, 17 Oct 2025 08:36:41 +0000 (04:36 -0400)] 
diff: restore redirection to /dev/null for diff_from_contents

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 <jake@zimmerman.io>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agoMerge branch 'ly/diff-name-only-with-diff-from-content' into jk/diff-from-contents-fix
Junio C Hamano [Fri, 17 Oct 2025 18:40:15 +0000 (11:40 -0700)] 
Merge branch 'ly/diff-name-only-with-diff-from-content' into jk/diff-from-contents-fix

* ly/diff-name-only-with-diff-from-content:
  diff: ensure consistent diff behavior with ignore options

3 weeks agodoc: add large-object-promisors.adoc to the docs build
Ramsay Jones [Thu, 16 Oct 2025 20:03:01 +0000 (21:03 +0100)] 
doc: add large-object-promisors.adoc to the docs build

Commit 5040f9f164 ("doc: add technical design doc for large object
promisors", 2025-02-18) added the large object promisors document
as a technical document (with a '.txt' extension). The merge commit
2c6fd30198 ("Merge branch 'cc/lop-remote'", 2025-03-05) seems to
have renamed the file with an '.adoc' extension.

Despite the '.adoc' extension, this document was not being formatted
by asciidoc(tor) as part of the docs build. In order to do so, add
the document to the make and meson build files.

Having added the document to the build, asciidoc and asciidoctor find
(slightly different) problems with the syntax of the input document.

The first set of warnings (only issued by asciidoc) relate to some
'section title out of sequence: expected level 3, got level 4'. This
document uses 'setext' style of section headers, using a series of
underline characters, where the character used denotes the level of
the title. From document title to level 5 (see [1]), these characters
are =, -, ~, ^, +. This does not seem to fit the error message, which
implies that those characters denote levels 0 -> 4. Replacing the headings
underlined with '+' by the '^' character eliminates these warnings.

The second set of warnings (only issued by asciidoctor) relate to some
headings which seem to use both arabic and roman numerals as part of
a single 'list' sequence. This elicited either 'unterminated listing
block' or (for example) 'list item index: expected I, got II' warnings.
In order not to mix arabic and roman numerals, remove the numeral from
the '0) Non goals' heading.  Similarly, the remaining roman numeral
entries had the ')' removed and turned into regular headings with I, II,
III ... at the beginning.

[1] https://asciidoctor.org/docs/asciidoc-recommended-practices/

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agodoc: commit-graph.adoc: fix up some formatting
Ramsay Jones [Thu, 16 Oct 2025 20:03:00 +0000 (21:03 +0100)] 
doc: commit-graph.adoc: fix up some formatting

The formatting markup syntax used in this document (markdown?) is not
interpreted correctly by asciidoc or asciidoctor. The main problem is
the use of a '## ' prefix markup for some sub-headings, along with the
use of '```' code markup and some missing literal blocks.

In order to improve the (html) document formatting:

  - replace the '## ' prefix sub-title syntax with the '~~' underlining
    syntax for the relevant sub-headings.
  - replace the '```' code markup, which causes asciidoc(tor) to simply
    remove the marked up text, with a literal block '----' markup.
  - the second ascii diagram, in the 'Merging commit-graph files'
    section, is not rendered correctly by asciidoctor (asciidoc is fine)
    so enclose it in a '....' block.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agodoc: sparse-checkout.adoc: fix asciidoc warnings
Ramsay Jones [Thu, 16 Oct 2025 20:02:59 +0000 (21:02 +0100)] 
doc: sparse-checkout.adoc: fix asciidoc warnings

Both asciidoc and asciidoctor issue warnings about 'list item index:
expected n got n-1' for n=1->7 on lines 928, 931, 951, 974, 980, 1033
and 1049. In asciidoc, numbered lists must start at one, whereas this
file has a list starting at zero. Also, asciidoc and asciidoctor warn
about 'section title out of sequence: expected level 1, got level 2'
on line 17. (asciidoc only complains about the first instance of this,
while asciidoctor complains about them all, on lines 95, 258, 303, 316,
545, 612, 752, 824, 895, 923 and 1053). These warnings stem from the
section titles not being correctly nested within a document/chapter
title.

In order to address the first set of warnings, simply renumber the list
from one to seven, rather than zero to six. Fortunately, this does not
require altering additional text, since the enumeration of 'Known Bugs'
is not referred to anywhere else in the document.

In order to address the second set of warnings, change the section title
syntax from '=== title ===' to '== title ==', effectively reducing the
nesting level of the title by one. Also, some apparent (sub-)titles are
not marked up with sub-title syntax, so add some '=== ' prefix(s) to the
relevant headings.

In addition to the warnings, address some other formatting issues:

  - the use of heavily nested unordered lists is not reflected in the
    output (making the file totally unreadable) because each level of
    nesting requires a different syntax. (i.e. replace '*' with '**'
    for the second level, '*' with '***' for the third level, etc.)
  - make use of literal blocks and manual indentation to get asciidoc
    and asciidoctor to display even remotely similar output.
  - make use of labelled lists, in some places, to get a similar looking
    output to the input, for both asciidoc and asciidoctor.
  - replace the trailing space in: `git grep ${SEARCH_TERM} OLDREV `
    otherwise the entire line in which that appears is removed from
    the output.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agodoc: remembering-renames.adoc: fix asciidoc warnings
Ramsay Jones [Thu, 16 Oct 2025 20:02:58 +0000 (21:02 +0100)] 
doc: remembering-renames.adoc: fix asciidoc warnings

Both asciidoc and ascidoctor issue warnings about 'list item index:
expected n got n-1' for n=1->9 on lines 13, 15, 17, 20, 23, 25, 29,
31 and 33. In asciidoc, numbered lists must start at one, whereas this
file has a list starting at zero. Also, asciidoc and asciidoctor warn
about 'section title out of sequence: expected level 1, got level 2'
on line 38. (asciidoc only complains about the first instance of this,
while asciidoctor complains about them all, on lines 94, 141, 142,
184, 185, 257, 288, 289, 290, 397, 424, 485, 486 and 487). These
warnings stem from the section titles not being correctly nested within
a document/chapter title.

In order to address the first set of warnings, simply renumber the list
from one to nine, rather than zero to eight. This also requires altering
the text which refers to the section numbers, including other section
titles.

In order to address the second set of warnings, change the section title
syntax from '=== title ===' to '== title ==', effectively reducing the
nesting level of the title by one. Also, some of the titles are given
over multiple lines (they are very long), with an title '===' prefix
on each line. This leads to them being treated as separate sections
with no body text (as you can see from the line numbers given for the
asciidoctor warnings, above). So, for these titles, turn them into a
single (long) line of text.

In addition to the warnings, address some other formatting issues:

  - the ascii branch diagrams didn't format correctly on asciidoctor
    so include them in a literal block.
  - several blocks of text were intended to be formatted 'as is' but
    were not included in a literal block.
  - in section 8, format the (A)->(D) in the text description as a
    literal with `` marks, since (C) is rendered as a copyright
    symbol in html otherwise.
  - in section 9, a sub-list of two items is not formatted as such.
    change the '*' introducer to '**' to correct the sub-list format.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agoRelNotes: sync with Git 2.51.1 fixups
Kristoffer Haugsbakk [Thu, 16 Oct 2025 10:31:43 +0000 (12:31 +0200)] 
RelNotes: sync with Git 2.51.1 fixups

Carry over the fixups from 8c3d7c5f (RelNotes: minor fixups before
2.51.1, 2025-10-15).

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agobuild(deps): bump actions/github-script from 7 to 8
Johannes Schindelin [Thu, 16 Oct 2025 15:48:12 +0000 (15:48 +0000)] 
build(deps): bump actions/github-script from 7 to 8

Bumps [actions/github-script](https://github.com/actions/github-script)
from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agobuild(deps): bump actions/setup-python from 5 to 6
Johannes Schindelin [Thu, 16 Oct 2025 15:48:11 +0000 (15:48 +0000)] 
build(deps): bump actions/setup-python from 5 to 6

Bumps [actions/setup-python](https://github.com/actions/setup-python)
from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agobuild(deps): bump actions/checkout from 4 to 5
Johannes Schindelin [Thu, 16 Oct 2025 15:48:10 +0000 (15:48 +0000)] 
build(deps): bump actions/checkout from 4 to 5

Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agobuild(deps): bump actions/download-artifact from 4 to 5
Johannes Schindelin [Thu, 16 Oct 2025 15:48:09 +0000 (15:48 +0000)] 
build(deps): bump actions/download-artifact from 4 to 5

Bumps
[actions/download-artifact](https://github.com/actions/download-artifact)
from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agot2401: update path checks using test_path helpers
Solly [Wed, 15 Oct 2025 14:03:29 +0000 (15:03 +0100)] 
t2401: update path checks using test_path helpers

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 <solobarine@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agodoc: git-pull: clarify how to exit a conflicted merge
Julia Evans [Wed, 15 Oct 2025 13:13:31 +0000 (13:13 +0000)] 
doc: git-pull: clarify how to exit a conflicted merge

From user feedback:

- One user is confused about why `git reset --merge`
  (why not just `git reset`?). Handle this by mentioning
  `git merge --abort` and `git reset --abort` instead, which have a
  more obvious meaning.
- 2 users want to know what "In older versions of Git" means exactly
  (in versions older than 1.7.0). Handle this by removing the warning
  since it was added 15 years ago (in 3f8fc184c0e2c)

Signed-off-by: Julia Evans <julia@jvns.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agodoc: git-pull: delete the example
Julia Evans [Wed, 15 Oct 2025 13:13:30 +0000 (13:13 +0000)] 
doc: git-pull: delete the example

From user feedback: this example is confusing because it implies that
`git pull` will run `git merge` by default, but the default is
`--ff-only`.

We could instead show an example of a fast-forward merge, but that may
not add a lot since fast-forward merges are relatively simple. This lets
us keep the description short.

Signed-off-by: Julia Evans <julia@jvns.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agodoc: git-pull: clarify options for integrating remote branch
Julia Evans [Wed, 15 Oct 2025 13:13:29 +0000 (13:13 +0000)] 
doc: git-pull: clarify options for integrating remote branch

From user feedback:

- One user is confused about the current default ("I was convinced that
  the git default was still to merge on pull")
- One user is confused about why "git fetch" isn't mentioned earlier
- One user says they always forget what the arguments to `git pull` are
  and that it's not immediately obvious that `--no-rebase` means "merge"
- One user wants `--ff-only` to be mentioned

Resolve this by listing the options for integrating the the remote
branch. This should help users figure out at a glance which one they
want to do, and make it clearer that --ff-only is the default.

Signed-off-by: Julia Evans <julia@jvns.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agodoc: git-pull: move <repository> and <refspec> params
Julia Evans [Wed, 15 Oct 2025 13:13:28 +0000 (13:13 +0000)] 
doc: git-pull: move <repository> and <refspec> params

From user feedback:

- it's confusing that we use both <branch> and <refspec> to refer to the
  second argument
- one user is not clear about what `refs/heads/*:refs/remotes/origin/*`
  is meant to be an example of ("is it like a path?")

The DESCRIPTION section is also doing a lot right now: it's trying to
describe both how the <repository> and <refspec> arguments work (which
is pretty complex, as seen in the DEFAULT BEHAVIOUR section)
as well as how `git pull` calls `git fetch` and merge/rebase/etc
depending on the arguments.

Handle this by moving the description of the <repository> and <refspec>
arguments to the OPTIONS section, so that we can focus on the
merge/rebase/etc behaviour in the DESCRIPTION section, and refer folks
to the later sections for details.

Use the term "upstream" instead of 'the "remote" and "merge"
configuration for the current branch' since users are more likely to
know what an "upstream" is.

Signed-off-by: Julia Evans <julia@jvns.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agoSync with Git 2.51.1
Junio C Hamano [Wed, 15 Oct 2025 17:31:31 +0000 (10:31 -0700)] 
Sync with Git 2.51.1

3 weeks agoGit 2.51.1 v2.51.1
Junio C Hamano [Wed, 15 Oct 2025 17:28:50 +0000 (10:28 -0700)] 
Git 2.51.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
3 weeks agoMerge branch 'kh/doc-patch-id-markup-fix' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:35 +0000 (10:29 -0700)] 
Merge branch 'kh/doc-patch-id-markup-fix' into maint-2.51

Documentation mark-up fix.

* kh/doc-patch-id-markup-fix:
  doc: patch-id: fix accidental literal blocks

3 weeks agoMerge branch 'ja/doc-markup-attached-paragraph-fix' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:35 +0000 (10:29 -0700)] 
Merge branch 'ja/doc-markup-attached-paragraph-fix' into maint-2.51

Documentation mark-up fix.

* ja/doc-markup-attached-paragraph-fix:
  doc: fix indentation of refStorage item in git-config(1)
  doc: change the markup of paragraphs following a nested list item

3 weeks agoMerge branch 'en/doc-merge-tree-describe-merge-base' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:35 +0000 (10:29 -0700)] 
Merge branch 'en/doc-merge-tree-describe-merge-base' into maint-2.51

Clarify the "--merge-base" command line option in "git merge-tree".

* en/doc-merge-tree-describe-merge-base:
  Documentation/git-merge-tree.adoc: clarify the --merge-base option

3 weeks agoMerge branch 'mh/doc-credential-url-prefix' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:34 +0000 (10:29 -0700)] 
Merge branch 'mh/doc-credential-url-prefix' into maint-2.51

Doc update to describe a feature that has already been implemented.

* mh/doc-credential-url-prefix:
  docs/gitcredentials: describe URL prefix matching

3 weeks agoMerge branch 'ps/odb-clean-stale-wrappers' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:34 +0000 (10:29 -0700)] 
Merge branch 'ps/odb-clean-stale-wrappers' into maint-2.51

Code clean-up.

* ps/odb-clean-stale-wrappers:
  odb: drop deprecated wrapper functions

3 weeks agoMerge branch 'ag/doc-sendmail-gmail-example-update' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:34 +0000 (10:29 -0700)] 
Merge branch 'ag/doc-sendmail-gmail-example-update' into maint-2.51

Doc update.

* ag/doc-sendmail-gmail-example-update:
  docs: update sendmail docs to use more secure SMTP server for Gmail

3 weeks agoMerge branch 'jc/doc-includeif-hasconfig-remote-url-fix' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:34 +0000 (10:29 -0700)] 
Merge branch 'jc/doc-includeif-hasconfig-remote-url-fix' into maint-2.51

Doc mark-up fix.

* jc/doc-includeif-hasconfig-remote-url-fix:
  config: document includeIf conditions consistently

3 weeks agoMerge branch 'mm/worktree-doc-typofix' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:33 +0000 (10:29 -0700)] 
Merge branch 'mm/worktree-doc-typofix' into maint-2.51

Docfix.

* mm/worktree-doc-typofix:
  docs: fix typo in worktree.adoc 'extension'

3 weeks agoMerge branch 'rs/object-name-extend-abbrev-len-update' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:33 +0000 (10:29 -0700)] 
Merge branch 'rs/object-name-extend-abbrev-len-update' into maint-2.51

Code clean-up.

* rs/object-name-extend-abbrev-len-update:
  object-name: declare pointer type of extend_abbrev_len()'s 2nd parameter

3 weeks agoMerge branch 'kh/doc-markup-fixes' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:33 +0000 (10:29 -0700)] 
Merge branch 'kh/doc-markup-fixes' into maint-2.51

Doc markup fixes.

* kh/doc-markup-fixes:
  doc: remove extra backtick for inline-verbatim
  doc: add missing backtick for inline-verbatim

3 weeks agoMerge branch 'km/alias-doc-markup-fix' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:32 +0000 (10:29 -0700)] 
Merge branch 'km/alias-doc-markup-fix' into maint-2.51

Docfix.

* km/alias-doc-markup-fix:
  doc: fix formatting of function-wrap shell alias

3 weeks agoMerge branch 'js/doc-sending-patch-via-thunderbird' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:32 +0000 (10:29 -0700)] 
Merge branch 'js/doc-sending-patch-via-thunderbird' into maint-2.51

Doc update.

* js/doc-sending-patch-via-thunderbird:
  doc/format-patch: adjust Thunderbird MUA hint to new add-on

3 weeks agoMerge branch 'kr/clone-synopsis-fix' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:32 +0000 (10:29 -0700)] 
Merge branch 'kr/clone-synopsis-fix' into maint-2.51

Doc fix.

* kr/clone-synopsis-fix:
  docs: remove stray bracket from git-clone synopsis

3 weeks agoMerge branch 'rj/t6137-cygwin-fix' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:31 +0000 (10:29 -0700)] 
Merge branch 'rj/t6137-cygwin-fix' into maint-2.51

Test fix for breakage introduced in Git 2.50.

* rj/t6137-cygwin-fix:
  t6137-*.sh: fix test failure on cygwin

3 weeks agoMerge branch 'kh/doc-git-log-markup-fix' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:31 +0000 (10:29 -0700)] 
Merge branch 'kh/doc-git-log-markup-fix' into maint-2.51

Doc update.

* kh/doc-git-log-markup-fix:
  doc: git-log: fix description list

3 weeks agoMerge branch 'kn/refs-files-case-insensitive' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:31 +0000 (10:29 -0700)] 
Merge branch 'kn/refs-files-case-insensitive' into maint-2.51

Deal more gracefully with directory / file conflicts when the files
backend is used for ref storage, by failing only the ones that are
involved in the conflict while allowing others.

* kn/refs-files-case-insensitive:
  refs/files: handle D/F conflicts during locking
  refs/files: handle F/D conflicts in case-insensitive FS
  refs/files: use correct error type when lock exists
  refs/files: catch conflicts on case-insensitive file-systems

3 weeks agoMerge branch 'pw/rebase-i-cleanup-fix' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:31 +0000 (10:29 -0700)] 
Merge branch 'pw/rebase-i-cleanup-fix' into maint-2.51

"git rebase -i" failed to clean-up the commit log message when the
command commits the final one in a chain of "fixup" commands, which
has been corrected.

* pw/rebase-i-cleanup-fix:
  sequencer: remove VERBATIM_MSG flag
  rebase -i: respect commit.cleanup when picking fixups

3 weeks agoMerge branch 'jk/add-i-color' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:30 +0000 (10:29 -0700)] 
Merge branch 'jk/add-i-color' into maint-2.51

Some among "git add -p" and friends ignored color.diff and/or
color.ui configuration variables, which is an old regression, which
has been corrected.

* jk/add-i-color:
  contrib/diff-highlight: mention interactive.diffFilter
  add-interactive: manually fall back color config to color.ui
  add-interactive: respect color.diff for diff coloring
  stash: pass --no-color to diff plumbing child processes

3 weeks agoMerge branch 'sg/line-log-boundary-fixes' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:30 +0000 (10:29 -0700)] 
Merge branch 'sg/line-log-boundary-fixes' into maint-2.51

A corner case bug in "git log -L..." has been corrected.

* sg/line-log-boundary-fixes:
  line-log: show all line ranges touched by the same diff range
  line-log: fix assertion error

3 weeks agoMerge branch 'ps/upload-pack-oom-protection' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:30 +0000 (10:29 -0700)] 
Merge branch 'ps/upload-pack-oom-protection' into maint-2.51

A broken or malicious "git fetch" can say that it has the same
object for many many times, and the upload-pack serving it can
exhaust memory storing them redundantly, which has been corrected.

* ps/upload-pack-oom-protection:
  upload-pack: don't ACK non-commits repeatedly in protocol v2
  t5530: modernize tests

3 weeks agoMerge branch 'ds/midx-write-fixes' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:30 +0000 (10:29 -0700)] 
Merge branch 'ds/midx-write-fixes' into maint-2.51

Fixes multiple crashes around midx write-out codepaths.

* ds/midx-write-fixes:
  midx-write: simplify error cases
  midx-write: reenable signed comparison errors
  midx-write: use uint32_t for preferred_pack_idx
  midx-write: use cleanup when incremental midx fails
  midx-write: put failing response value back
  midx-write: only load initialized packs

3 weeks agoMerge branch 'ds/path-walk-repack-fix' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:29 +0000 (10:29 -0700)] 
Merge branch 'ds/path-walk-repack-fix' into maint-2.51

"git repack --path-walk" lost objects in some corner cases, which
has been corrected.
cf. <CABPp-BHFxxGrqKc0m==TjQNjDGdO=H5Rf6EFsf2nfE1=TuraOQ@mail.gmail.com>

* ds/path-walk-repack-fix:
  path-walk: create initializer for path lists
  path-walk: fix setup of pending objects

3 weeks agoMerge branch 'jk/fetch-check-graph-objects-fix' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:29 +0000 (10:29 -0700)] 
Merge branch 'jk/fetch-check-graph-objects-fix' into maint-2.51

Under a race against another process that is repacking the
repository, especially a partially cloned one, "git fetch" may
mistakenly think some objects we do have are missing, which has
been corrected.

* jk/fetch-check-graph-objects-fix:
  fetch-pack: re-scan when double-checking graph objects

3 weeks agoMerge branch 'ly/diff-name-only-with-diff-from-content' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:29 +0000 (10:29 -0700)] 
Merge branch 'ly/diff-name-only-with-diff-from-content' into maint-2.51

Various options to "git diff" that makes comparison ignore certain
aspects of the differences (like "space changes are ignored",
"differences in lines that match these regular expressions are
ignored") did not work well with "--name-only" and friends.

* ly/diff-name-only-with-diff-from-content:
  diff: ensure consistent diff behavior with ignore options

3 weeks agoMerge branch 'jc/diff-no-index-in-subdir' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:28 +0000 (10:29 -0700)] 
Merge branch 'jc/diff-no-index-in-subdir' into maint-2.51

"git diff --no-index" run inside a subdirectory under control of a
Git repository operated at the top of the working tree and stripped
the prefix from the output, and oddballs like "-" (stdin) did not
work correctly because of it.  Correct the set-up by undoing what
the set-up sequence did to cwd and prefix.

* jc/diff-no-index-in-subdir:
  diff: --no-index should ignore the worktree

3 weeks agoMerge branch 'en/ort-rename-fixes' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:28 +0000 (10:29 -0700)] 
Merge branch 'en/ort-rename-fixes' into maint-2.51

Various bugs about rename handling in "ort" merge strategy have
been fixed.

* en/ort-rename-fixes:
  merge-ort: fix directory rename on top of source of other rename/delete
  merge-ort: fix incorrect file handling
  merge-ort: clarify the interning of strings in opt->priv->path
  t6423: fix missed staging of file in testcases 12i,12j,12k
  t6423: document two bugs with rename-to-self testcases
  merge-ort: drop unnecessary temporary in check_for_directory_rename()
  merge-ort: update comments to modern testfile location

3 weeks agoMerge branch 'dl/push-missing-object-error' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:28 +0000 (10:29 -0700)] 
Merge branch 'dl/push-missing-object-error' into maint-2.51

"git push" had a code path that led to BUG() but it should have
been a die(), as it is a response to a usual but invalid end-user
action to attempt pushing an object that does not exist.
cf. <xmqqo6spiyqp.fsf@gitster.g>

* dl/push-missing-object-error:
  remote.c: convert if-else ladder to switch
  remote.c: remove BUG in show_push_unqualified_ref_name_error()
  t5516: remove surrounding empty lines in test bodies