]> git.ipfire.org Git - thirdparty/git.git/log
thirdparty/git.git
9 hours agoThe twenty-second batch main master
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>
9 hours 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

9 hours 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

9 hours 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

9 hours 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 days 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 days 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 days 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 days 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 days 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 days 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

5 days 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>
5 days 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 '/'

5 days 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

5 days 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

5 days 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

6 days 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>
6 days 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>
6 days 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>
6 days 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>
6 days 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>
7 days 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>
7 days 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>
7 days 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>
7 days 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>
7 days 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>
7 days 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

7 days agoGit 2.51.1 maint 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>
7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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'

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days 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

7 days agoMerge branch 'ps/reflog-migrate-fixes' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:27 +0000 (10:29 -0700)] 
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

7 days agoMerge branch 'js/rebase-i-allow-drop-on-a-merge' into maint-2.51
Junio C Hamano [Wed, 15 Oct 2025 17:29:27 +0000 (10:29 -0700)] 
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

7 days agoRelNotes: minor fixups before 2.51.1
Kristoffer Haugsbakk [Wed, 15 Oct 2025 09:48:57 +0000 (11:48 +0200)] 
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>
8 days agoSync with 'maint'
Junio C Hamano [Tue, 14 Oct 2025 20:44:35 +0000 (13:44 -0700)] 
Sync with 'maint'

8 days agoPrepare for 2.51.1
Junio C Hamano [Tue, 14 Oct 2025 19:42:59 +0000 (12:42 -0700)] 
Prepare for 2.51.1

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 days agoMerge branch 'ps/ci-avoid-broken-sudo-on-ubuntu' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:41:38 +0000 (13:41 -0700)] 
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)

8 days agoMerge branch 'jk/curl-global-trace-components' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:41:25 +0000 (13:41 -0700)] 
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

8 days agoMerge branch 'kh/doc-fast-import-markup-fix' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:55 +0000 (13:40 -0700)] 
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

8 days agoMerge branch 'kh/doc-config-typofix' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:55 +0000 (13:40 -0700)] 
Merge branch 'kh/doc-config-typofix' into maint-2.51

Documentation typofix.

* kh/doc-config-typofix:
  doc: config: replace backtick with apostrophe for possessive

8 days agoMerge branch 'kh/doc-interpret-trailers-markup-fix' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:54 +0000 (13:40 -0700)] 
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

8 days agoMerge branch 'ds/doc-count-objects-fix' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:54 +0000 (13:40 -0700)] 
Merge branch 'ds/doc-count-objects-fix' into maint-2.51

Docfix.

* ds/doc-count-objects-fix:
  count-objects: document count-objects pack

8 days agoMerge branch 'ja/asciidoc-doctor-verbatim-fixes' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:54 +0000 (13:40 -0700)] 
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

8 days agoMerge branch 'da/cargo-serialize' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:54 +0000 (13:40 -0700)] 
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

8 days agoMerge branch 'js/progress-delay-fix' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:53 +0000 (13:40 -0700)] 
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

8 days agoMerge branch 'js/curl-off-t-fixes' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:53 +0000 (13:40 -0700)] 
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

8 days agoMerge branch 'jt/clang-format-foreach-wo-space-before-parenthesis' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:53 +0000 (13:40 -0700)] 
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

8 days agoMerge branch 'ds/doc-ggg-pr-fork-clarify' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:53 +0000 (13:40 -0700)] 
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

8 days agoMerge branch 'js/doc-gitk-history' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:52 +0000 (13:40 -0700)] 
Merge branch 'js/doc-gitk-history' into maint-2.51

Manual page for "gitk" is updated with the current maintainer's
name.

* js/doc-gitk-history:
  doc/gitk: update reference to the external project

8 days agoMerge branch 'bc/doc-compat-object-format-not-working' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:52 +0000 (13:40 -0700)] 
Merge branch 'bc/doc-compat-object-format-not-working' into maint-2.51

The compatObjectFormat extension is used to hide an incomplete
feature that is not yet usable for any purpose other than
developing the feature further.  Document it as such to discourage
its use by mere mortals.

* bc/doc-compat-object-format-not-working:
  docs: note that extensions.compatobjectformat is incomplete

8 days agoMerge branch 'kh/you-still-use-whatchanged-fix' into maint-2.51
Junio C Hamano [Tue, 14 Oct 2025 20:40:52 +0000 (13:40 -0700)] 
Merge branch 'kh/you-still-use-whatchanged-fix' into maint-2.51

The "do you still use it?" message given by a command that is
deeply deprecated and allow us to suggest alternatives has been
updated.

* kh/you-still-use-whatchanged-fix:
  BreakingChanges: remove claim about whatchanged reports
  whatchanged: remove not-even-shorter clause
  whatchanged: hint about git-log(1) and aliasing
  you-still-use-that??: help the user help themselves
  t0014: test shadowing of aliases for a sample of builtins
  git: allow alias-shadowing deprecated builtins
  git: move seen-alias bookkeeping into handle_alias(...)
  git: add `deprecated` category to --list-cmds
  Makefile: don’t add whatchanged after it has been removed

8 days agoThe nineteenth batch
Junio C Hamano [Tue, 14 Oct 2025 19:49:28 +0000 (12:49 -0700)] 
The nineteenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 days agoMerge branch 'jc/optional-path'
Junio C Hamano [Tue, 14 Oct 2025 19:56:09 +0000 (12:56 -0700)] 
Merge branch 'jc/optional-path'

Configuration variables that take a pathname as a value
(e.g. blame.ignorerevsfile) can be marked as optional by prefixing
":(optoinal)" before its value.

* jc/optional-path:
  parseopt: values of pathname type can be prefixed with :(optional)
  config: values of pathname type can be prefixed with :(optional)
  t7500: fix GIT_EDITOR shell snippet
  t7500: make each piece more independent

8 days agoMerge branch 'je/doc-push-upstream'
Junio C Hamano [Tue, 14 Oct 2025 19:56:09 +0000 (12:56 -0700)] 
Merge branch 'je/doc-push-upstream'

Documentation updates.

* je/doc-push-upstream:
  doc: git-push: add explanation of `git push origin main`
  doc: git-push: clarify "what to push"
  doc: git-push: clarify "where to push"
  doc: add an UPSTREAM BRANCHES section to pull/push/fetch
  doc: git-push: clarify intro

8 days agoMerge branch 'kh/format-patch-range-diff-notes'
Junio C Hamano [Tue, 14 Oct 2025 19:56:09 +0000 (12:56 -0700)] 
Merge branch 'kh/format-patch-range-diff-notes'

"git format-patch --range-diff=... --notes=..." did not drive the
underlying range-diff with correct --notes parameter, ending up
comparing with different set of notes from its main patch output
you would get from "git format-patch --notes=..." for a singleton
patch.

* kh/format-patch-range-diff-notes:
  format-patch: handle range-diff on notes correctly for single patches
  revision: add rdiff_log_arg to rev_info
  range-diff: rename other_arg to log_arg

8 days agoMerge branch 'en/xdiff-cleanup'
Junio C Hamano [Tue, 14 Oct 2025 19:56:09 +0000 (12:56 -0700)] 
Merge branch 'en/xdiff-cleanup'

A lot of code clean-up of xdiff.
Split out of a larger topic.

* en/xdiff-cleanup:
  xdiff: change type of xdfile_t.changed from char to bool
  xdiff: add macros DISCARD(0), KEEP(1), INVESTIGATE(2) in xprepare.c
  xdiff: rename rchg -> changed in xdfile_t
  xdiff: delete chastore from xdfile_t
  xdiff: delete fields ha, line, size in xdlclass_t in favor of an xrecord_t
  xdiff: delete redundant array xdfile_t.ha
  xdiff: delete struct diffdata_t
  xdiff: delete local variables that alias fields in xrecord_t
  xdiff: delete superfluous function xdl_get_rec() in xemit
  xdiff: delete unnecessary fields from xrecord_t and xdfile_t
  xdiff: delete local variables and initialize/free xdfile_t directly
  xdiff: delete static forward declarations in xprepare

8 days agoMerge branch 'pw/add-p-hunk-splitting-fix'
Junio C Hamano [Tue, 14 Oct 2025 19:56:08 +0000 (12:56 -0700)] 
Merge branch 'pw/add-p-hunk-splitting-fix'

Marking a hunk 'selected' in "git add -p" and then splitting made
all the split pieces 'selected'; this has been changed to make them
all 'undecided', which gives better end-user experience.

* pw/add-p-hunk-splitting-fix:
  add-patch: update hunk splitability after editing
  add -p: mark split hunks as undecided

8 days agoMerge branch 'sj/string-list'
Junio C Hamano [Tue, 14 Oct 2025 19:56:08 +0000 (12:56 -0700)] 
Merge branch 'sj/string-list'

The "string-list" API function to find where a given string would
be inserted got updated so that it can use unrealistically huge
array index that would only fit in size_t but not int or ssize_t
to achieve unstated goal.

* sj/string-list:
  refs: enable sign compare warnings check
  string-list: change "string_list_find_insert_index" return type to "size_t"
  string-list: replace negative index encoding with "exact_match" parameter
  string-list: use bool instead of int for "exact_match"

8 days agoMerge branch 'kh/doc-patch-id-markup-fix'
Junio C Hamano [Tue, 14 Oct 2025 19:56:08 +0000 (12:56 -0700)] 
Merge branch 'kh/doc-patch-id-markup-fix'

Documentation mark-up fix.

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

8 days agoMerge branch 'jn/doc-help-translaing-pretty-options'
Junio C Hamano [Tue, 14 Oct 2025 19:56:08 +0000 (12:56 -0700)] 
Merge branch 'jn/doc-help-translaing-pretty-options'

Documentation for "git log --pretty" options has been updated
to make it easier to translate.

* jn/doc-help-translaing-pretty-options:
  doc: do not break sentences into "lego" pieces

8 days agoMerge branch 'jn/doc-synopsis'
Junio C Hamano [Tue, 14 Oct 2025 19:56:08 +0000 (12:56 -0700)] 
Merge branch 'jn/doc-synopsis'

Doc-mark-up modernization continues.

* jn/doc-synopsis:
  doc: convert git worktree to synopsis style
  doc: convert git tag to synopsis style
  doc: convert git-stash.adoc to synopis style

8 days agoThe eighteenth batch
Junio C Hamano [Tue, 14 Oct 2025 04:49:32 +0000 (21:49 -0700)] 
The eighteenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
8 days agoMerge branch 'kn/reftable-consistency-checks'
Junio C Hamano [Tue, 14 Oct 2025 05:00:35 +0000 (22:00 -0700)] 
Merge branch 'kn/reftable-consistency-checks'

The reftable backend learned to sanity check its on-disk data more
carefully.

* kn/reftable-consistency-checks:
  refs/reftable: add fsck check for checking the table name
  reftable: add code to facilitate consistency checks
  fsck: order 'fsck_msg_type' alphabetically
  Documentation/fsck-msgids: remove duplicate msg id
  reftable: check for trailing newline in 'tables.list'
  refs: move consistency check msg to generic layer
  refs: remove unused headers

8 days agoMerge branch 'ps/commit-graph-per-object-source'
Junio C Hamano [Tue, 14 Oct 2025 05:00:35 +0000 (22:00 -0700)] 
Merge branch 'ps/commit-graph-per-object-source'

Code clean-up around commit-graph.

* ps/commit-graph-per-object-source:
  commit-graph: pass graphs that are to be merged as parameter
  commit-graph: return commit graph from `repo_find_commit_pos_in_graph()`
  commit-graph: return the prepared commit graph from `prepare_commit_graph()`
  revision: drop explicit check for commit graph
  blame: drop explicit check for commit graph

8 days agoMerge branch 'ja/doc-markup-attached-paragraph-fix'
Junio C Hamano [Tue, 14 Oct 2025 05:00:35 +0000 (22:00 -0700)] 
Merge branch 'ja/doc-markup-attached-paragraph-fix'

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

8 days agoMerge branch 'ps/ci-avoid-broken-sudo-on-ubuntu'
Junio C Hamano [Tue, 14 Oct 2025 05:00:34 +0000 (22:00 -0700)] 
Merge branch 'ps/ci-avoid-broken-sudo-on-ubuntu'

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)

9 days agobuiltin/cat-file.c: simplify calling `report_object_status()`
Taylor Blau [Mon, 13 Oct 2025 21:56:01 +0000 (17:56 -0400)] 
builtin/cat-file.c: simplify calling `report_object_status()`

In b0b910e052 (cat-file.c: add batch handling for submodules,
2025-06-02), we began handling submodule entries specially when batching
cat-file like so:

  $ echo :sha1collisiondetection | git.compile cat-file --batch-check
  855827c583bc30645ba427885caa40c5b81764d2 submodule

Commit b0b910e052 notes that submodules are handled differently than
non-existent objects, which print "<given-name> <type>", since there is
(a) no object to resolve the OID of in the first place, and as commit
b0b910e052 notes, (b) for submodules in particular, it is useful to know
what commit it points at without having to spawn another Git process.

That commit does so by calling report_object_status() and passing in
"oid_to_hex(&data->oid)" for the "obj_name" parameter. This is
unnecessary, however, since report_object_status() will do the same
automatically if given a NULL "obj_name" argument.

That behavior dates back to 6a951937ae (cat-file: add
--batch-all-objects option, 2015-06-22), so rely on that instead of
having the caller open-code that part of report_object_status().

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 days agoci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)
Patrick Steinhardt [Fri, 10 Oct 2025 09:41:14 +0000 (11:41 +0200)] 
ci: fix broken jobs on Ubuntu 25.10 caused by switch to sudo-rs(1)

Ubuntu 25.10 has been released. One prominent change in this version of
Ubuntu is the switch to some Rust-based utilities. Part of this switch
is also that Ubuntu now defaults to sudo-rs(1).

Unfortunately, this breaks our CI because sudo-rs(1) does not support
the `--preserve-env` flag. Let's revert back to the C-based sudo(1)
implementation to fix this.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 days agoThe seventeenth batch
Junio C Hamano [Fri, 10 Oct 2025 19:51:35 +0000 (12:51 -0700)] 
The seventeenth batch

Signed-off-by: Junio C Hamano <gitster@pobox.com>
12 days agoMerge branch 'en/doc-merge-tree-describe-merge-base'
Junio C Hamano [Fri, 10 Oct 2025 19:51:46 +0000 (12:51 -0700)] 
Merge branch 'en/doc-merge-tree-describe-merge-base'

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

12 days agoMerge branch 'rj/doc-missing-technical-docs'
Junio C Hamano [Fri, 10 Oct 2025 19:51:46 +0000 (12:51 -0700)] 
Merge branch 'rj/doc-missing-technical-docs'

Doc updates.

* rj/doc-missing-technical-docs:
  doc: add some missing technical documents

12 days agoMerge branch 'ps/gitlab-ci-windows-improvements'
Junio C Hamano [Fri, 10 Oct 2025 19:51:46 +0000 (12:51 -0700)] 
Merge branch 'ps/gitlab-ci-windows-improvements'

GitLab CI improvements.

* ps/gitlab-ci-windows-improvements:
  t8020: fix test failure due to indeterministic tag sorting
  gitlab-ci: upload Meson test logs as JUnit reports
  gitlab-ci: drop workaround for Python certificate store on Windows
  gitlab-ci: ignore failures to disable realtime monitoring
  gitlab-ci: dedup instructions to disable realtime monitoring

12 days agodoc: fix accidental literal blocks
Kristoffer Haugsbakk [Wed, 8 Oct 2025 11:48:46 +0000 (13:48 +0200)] 
doc: fix accidental literal blocks

Make sure that normal paragraphs in most user-facing docs[1] don’t
use literal blocks. This can easily happen if you try to maintain
indentation in order to continue a block; that might work in
e.g. Markdown variants, but not in AsciiDoc.

The fixes are straightforward, i.e. just deindent the block and maybe
add line continuations. The only exception is git-sparse-checkout(1)
where we also replace indentation used for *intended* literal blocks
with `----`.

† 1: These have not been considered:
     • `Documentation/howto/`
     • `Documentation/technical/`
     • `Documentation/gitprotocol*`

Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 days agodoc: explain the impact of stash.index on --autostash options
D. Ben Knoble [Mon, 6 Oct 2025 12:59:29 +0000 (08:59 -0400)] 
doc: explain the impact of stash.index on --autostash options

With 9842c0c749 (stash: honor stash.index in apply, pop modes,
2025-09-21) merged in a5d4779e6e (Merge branch 'dk/stash-apply-index',
2025-09-29), we did not advertise the connection between the new config
option stash.index and the implicit use of git-stash via --autostash
(which may also be configured). Do so.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 days agot1010: use BROKEN_OBJECTS prerequisite
brian m. carlson [Thu, 9 Oct 2025 21:56:26 +0000 (21:56 +0000)] 
t1010: use BROKEN_OBJECTS prerequisite

When hash compatibility mode is enabled, we cannot write broken objects
because they cannot be mapped into the other hash algorithm.  Use the
BROKEN_OBJECTS prerequisite to disable these tests and the writing of
broken objects in this mode.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
13 days agot: allow specifying compatibility hash
brian m. carlson [Thu, 9 Oct 2025 21:56:25 +0000 (21:56 +0000)] 
t: allow specifying compatibility hash

We want to specify a compatibility hash for testing interactions for
SHA-256 repositories where we have SHA-1 compatibility enabled.  Allow
the user to specify this scenario in the test suite by setting
GIT_TEST_DEFAULT_HASH to "sha256:sha1".

Note that this will get passed into GIT_DEFAULT_HASH, which Git itself
does not presently support.  However, we will support this in a future
commit.

Since we'll now want to know the value for a specific version, let's add
the ability to specify either the storage hash (in this case, SHA-256)
or the compatibility hash (SHA-1).  We use a different value for the
compatibility hash that will be enabled for all repositories
(test_repo_compat_hash_algo) versus the one that is used individually in
some tests (test_compat_hash_algo), since we want to still run those
individual tests without requiring that the testsuite be run fully in a
compatibility mode.

In some cases, we'll need to adjust our test suite to work in a proper
way with a compatibility hash.  For example, in such a case, we'll only
use pack index v3, since v1 and v2 lack support for multiple algorithms.
Since we won't want to write those older formats, we'll need to skip
tests that do so.  Let's add a COMPAT_HASH prerequisite for this
purpose.

Finally, in this scenario, we can no longer rely on having broken
objects work since we lack compatibility mappings to rewrite objects in
the repository.  Add a prerequisite, BROKEN_OBJECTS, that we define in
terms of COMPAT_HASH and checks to see if creating deliberately broken
objects is possible, so that we can disable these tests if not.

Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>