Commit Graph

78202 Commits (70b475f9382b4edd741e342790dd382a12779a65)

Author SHA1 Message Date
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 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
Jeff King 623f7af284 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>
2025-10-17 11:41:50 -07:00
Junio C Hamano 1e0a3e8f8f 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
2025-10-17 11:40:15 -07:00
Junio C Hamano 81f86aacc4 Git 2.51.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15 10:29:35 -07:00
Junio C Hamano ae8ea7c6bd 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
2025-10-15 10:29:35 -07:00
Junio C Hamano 554e474d03 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
2025-10-15 10:29:35 -07:00
Junio C Hamano 92043e9460 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
2025-10-15 10:29:35 -07:00
Junio C Hamano d204057940 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
2025-10-15 10:29:35 -07:00
Junio C Hamano 88ad76ca89 Merge branch 'ps/odb-clean-stale-wrappers' into maint-2.51
Code clean-up.

* ps/odb-clean-stale-wrappers:
  odb: drop deprecated wrapper functions
2025-10-15 10:29:34 -07:00
Junio C Hamano 2a33cd6864 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
2025-10-15 10:29:34 -07:00
Junio C Hamano e0a4669e56 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
2025-10-15 10:29:34 -07:00
Junio C Hamano 2ab0f47bd3 Merge branch 'mm/worktree-doc-typofix' into maint-2.51
Docfix.

* mm/worktree-doc-typofix:
  docs: fix typo in worktree.adoc 'extension'
2025-10-15 10:29:34 -07:00
Junio C Hamano 6d1f4859e1 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
2025-10-15 10:29:33 -07:00
Junio C Hamano 2d9f2dc7ce 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
2025-10-15 10:29:33 -07:00
Junio C Hamano f07b97aa6e 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
2025-10-15 10:29:33 -07:00
Junio C Hamano 51195bdab2 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
2025-10-15 10:29:32 -07:00
Junio C Hamano 9c22d96e56 Merge branch 'kr/clone-synopsis-fix' into maint-2.51
Doc fix.

* kr/clone-synopsis-fix:
  docs: remove stray bracket from git-clone synopsis
2025-10-15 10:29:32 -07:00
Junio C Hamano b168cbdc20 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
2025-10-15 10:29:32 -07:00
Junio C Hamano 9740baaf0e 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
2025-10-15 10:29:31 -07:00
Junio C Hamano ff8ef0f9f3 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
2025-10-15 10:29:31 -07:00
Junio C Hamano ac57c870aa 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
2025-10-15 10:29:31 -07:00
Junio C Hamano b3c96ce08f 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
2025-10-15 10:29:31 -07:00
Junio C Hamano f06ea7cf3c 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
2025-10-15 10:29:30 -07:00
Junio C Hamano caba7e3d86 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
2025-10-15 10:29:30 -07:00
Junio C Hamano 7614e4165a 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
2025-10-15 10:29:30 -07:00
Junio C Hamano 03a3c40c2e 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
2025-10-15 10:29:29 -07:00
Junio C Hamano bb5cdab7c0 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
2025-10-15 10:29:29 -07:00
Junio C Hamano 77f8e1002b 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
2025-10-15 10:29:29 -07:00
Junio C Hamano 2dad35f32f 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
2025-10-15 10:29:29 -07:00
Junio C Hamano 0949f24eb4 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
2025-10-15 10:29:28 -07:00
Junio C Hamano 1e2e74db6e 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
2025-10-15 10:29:28 -07:00
Junio C Hamano e04c0aded3 Merge branch 'ps/reflog-migrate-fixes' into maint-2.51
"git refs migrate" to migrate the reflog entries from a refs
backend to another had a handful of bugs squashed.

* ps/reflog-migrate-fixes:
  refs: fix invalid old object IDs when migrating reflogs
  refs: stop unsetting REF_HAVE_OLD for log-only updates
  refs/files: detect race when generating reflog entry for HEAD
  refs: fix identity for migrated reflogs
  ident: fix type of string length parameter
  builtin/reflog: implement subcommand to write new entries
  refs: export `ref_transaction_update_reflog()`
  builtin/reflog: improve grouping of subcommands
  Documentation/git-reflog: convert to use synopsis type
2025-10-15 10:29:28 -07:00
Junio C Hamano d549c188be Merge branch 'js/rebase-i-allow-drop-on-a-merge' into maint-2.51
During interactive rebase, using 'drop' on a merge commit lead to
an error, which was incorrect.

* js/rebase-i-allow-drop-on-a-merge:
  rebase -i: permit 'drop' of a merge commit
2025-10-15 10:29:27 -07:00
Kristoffer Haugsbakk 8c3d7c5f11 RelNotes: minor fixups before 2.51.1
Grammar and typo fixes. Also change “work it around” to “work around”.

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-15 09:25:00 -07:00
Junio C Hamano dba6e578b6 Prepare for 2.51.1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-10-14 13:43:25 -07:00
Junio C Hamano 73f63c39ad Merge branch 'ps/ci-avoid-broken-sudo-on-ubuntu' into maint-2.51
Our CI script requires "sudo" that can be told to preserve
environment, but Ubuntu replaced with "sudo" with an implementation
that lacks the feature.  Work this around by reinstalling the
original version.

* ps/ci-avoid-broken-sudo-on-ubuntu:
  ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)
2025-10-14 13:41:38 -07:00
Junio C Hamano 2ba32befc9 Merge branch 'jk/curl-global-trace-components' into maint-2.51
Adjust to the way newer versions of cURL selectivel enables tracing
options, so that our tests can continue to work.

* jk/curl-global-trace-components:
  curl: add support for curl_global_trace() components
2025-10-14 13:41:25 -07:00
Junio C Hamano 3bc761681f Merge branch 'kh/doc-fast-import-markup-fix' into maint-2.51
Doc mark-up fix.

* kh/doc-fast-import-markup-fix:
  doc: fast-import: replace literal block with paragraph
2025-10-14 13:40:55 -07:00
Junio C Hamano 12c542bbcf Merge branch 'kh/doc-config-typofix' into maint-2.51
Documentation typofix.

* kh/doc-config-typofix:
  doc: config: replace backtick with apostrophe for possessive
2025-10-14 13:40:55 -07:00
Junio C Hamano fb3f8af737 Merge branch 'kh/doc-interpret-trailers-markup-fix' into maint-2.51
Fix missing single-quote pairs in a documentation page.

* kh/doc-interpret-trailers-markup-fix:
  doc: interpret-trailers: close all pairs of single quotes
2025-10-14 13:40:55 -07:00
Junio C Hamano d227777796 Merge branch 'ds/doc-count-objects-fix' into maint-2.51
Docfix.

* ds/doc-count-objects-fix:
  count-objects: document count-objects pack
2025-10-14 13:40:54 -07:00
Junio C Hamano 7d050a531d Merge branch 'ja/asciidoc-doctor-verbatim-fixes' into maint-2.51
Doc mark-up fix.

* ja/asciidoc-doctor-verbatim-fixes:
  doc: fix asciidoc format compatibility in pretty-formats.adoc
2025-10-14 13:40:54 -07:00
Junio C Hamano 21c234873d Merge branch 'da/cargo-serialize' into maint-2.51
Makefile tried to run multiple "cargo build" which would not work
very well; serialize their execution to work it around.

* da/cargo-serialize:
  Makefile: build libgit-rs and libgit-sys serially
2025-10-14 13:40:54 -07:00
Junio C Hamano 5b57e1e926 Merge branch 'js/progress-delay-fix' into maint-2.51
The start_delayed_progress() function in the progress eye-candy API
did not clear its internal state, making an initial delay value
larger than 1 second ineffective, which has been corrected.

* js/progress-delay-fix:
  progress: pay attention to (customized) delay time
2025-10-14 13:40:54 -07:00
Junio C Hamano 55282f50ac Merge branch 'js/curl-off-t-fixes' into maint-2.51
A few places where an size_t value was cast to curl_off_t without
checking has been updated to use the existing helper function.

* js/curl-off-t-fixes:
  http-push: avoid new compile error
  imap-send: be more careful when casting to `curl_off_t`
  http: offer to cast `size_t` to `curl_off_t` safely
2025-10-14 13:40:53 -07:00
Junio C Hamano 94f292f511 Merge branch 'jt/clang-format-foreach-wo-space-before-parenthesis' into maint-2.51
Clang-format update to let our control macros formatted the way we
had them traditionally, e.g., "for_each_string_list_item()" without
space before the parentheses.

* jt/clang-format-foreach-wo-space-before-parenthesis:
  clang-format: exclude control macros from SpaceBeforeParens
2025-10-14 13:40:53 -07:00
Junio C Hamano 3778b8022d Merge branch 'ds/doc-ggg-pr-fork-clarify' into maint-2.51
Update the instruction to use of GGG in the MyFirstContribution
document to say that a GitHub PR could be made against `git/git`
instead of `gitgitgadget/git`.

* ds/doc-ggg-pr-fork-clarify:
  doc: clarify which remotes can be used with GitGitGadget
2025-10-14 13:40:53 -07:00