Commit Graph

82631 Commits (8fdf16a77815f1cd6940daeb7d993f59dd85dc41)

Author SHA1 Message Date
Junio C Hamano 8fdf16a778 Merge branch 'cc/early-scan-options' into seen
The process of parsing command-line options in commands that
perform an early scan over their arguments (such as 'git bisect',
'git rev-parse', and 'git fast-import') has been unified using a
new early-scan sub-API, which parses and skips known options taking
separate values to prevent logic bugs.

* cc/early-scan-options:
  fast-import: use early_scan_options() for --allow-unsafe-features
  parse-options: add early_scan_options()
  parse-options: extract lookup_long_opt() from parse_long_opt()
  parse-options: add parse_options_takes_argument()
2026-10-12 09:26:10 -07:00
Junio C Hamano 8897dfaaaf Merge branch 'tc/last-modified-bloom' into seen
The 'git last-modified' command has been optimized by using Bloom
filters.  It now reuses revision walk filtering logic from 'git log'
to pre-filter commits, and maintains per-path Bloom filters even when
wildcard pathspecs are used.

* tc/last-modified-bloom:
  last-modified: keep per-path Bloom filters for wildcard pathspecs
  last-modified: check pathspec against Bloom filter first
  revision: add Bloom check that includes parent directories
  bloom: add helper to check if any key in a vector is present
  revision: expose check for paths maybe changed in Bloom filter
  revision: move bloom keyvec precondition into function
2026-10-12 09:26:10 -07:00
Junio C Hamano c95eff25a1 Merge branch 'll/doc-pushcert-if-asked' into seen
The remote helper documentation for the 'pushcert' option has been
updated to mention that it can also take 'if-asked', reflecting the
existing implementation in the code.

* ll/doc-pushcert-if-asked:
  doc: remote-helpers: option pushcert if-asked
2026-10-12 09:26:10 -07:00
Junio C Hamano 179850e436 Merge branch 'ws/squelch-svn-migrate' into seen
* ws/squelch-svn-migrate:
  Makefile: add NO_GIT_SVN knob to skip building/installing git-svn
  git-svn: don't print v1-layout migration noise when there's nothing to migrate
2026-10-12 09:26:10 -07:00
Junio C Hamano 644a9d82e4 Merge branch 'kh/format-rev-more-options' into seen
The experimental 'git format-rev' has been taught a few more
formatting options.

* kh/format-rev-more-options:
  format-rev: learn --abbrev, --color, and --date
  doc: rev-list-options.adoc: factor out --date alts
  format-rev: factor option variables into a struct
  format-rev: place BUG calls first in callback
  format-rev: use lower case for opts description
2026-10-12 09:26:10 -07:00
Junio C Hamano c4544901cb Merge branch 'bc/restrict-hex-to-lowercase' into seen
The parser for hex object names has been updated to reject uppercase
hexadecimal characters when running in the breaking changes mode, in
preparation for Git 3.0.

* bc/restrict-hex-to-lowercase:
  hex: allow only lowercase object IDs in breaking changes mode
  t5324: adjust tests for corrupt commit-graph
  object-name: use hexval
  hex: label usages of hex parsing for object IDs
  hex: make hex_to_bytes accept kind of hex to use
  hex: allow specifying hex type with hex2chr
  hex: add functionality for lowercase-only hex
2026-10-12 09:26:09 -07:00
Junio C Hamano 82a3c684ac Merge branch 'pz/fetch-submodule-errors-config' into seen
The 'git fetch' command can now configure how submodule fetch errors
are handled via 'fetch.submoduleErrors' and '--submodule-errors',
making them non-fatal.  A premature failure during recursive submodule
fetches has been fixed by deferring the error until the OID-based
retry phase fails.

* pz/fetch-submodule-errors-config:
  fetch: add fetch.submoduleErrors to make submodule fetch errors non-fatal
  submodule: fix premature failure in recursive submodule fetch
2026-10-12 09:26:09 -07:00
Junio C Hamano 0203b8eded Merge branch 'kj/repo-info-more-path-keys' into seen
The 'git repo info' command has been taught more keys to output
paths of various repository components (such as the working tree
root, superproject working tree, object database, etc.), supporting
both absolute and relative path formats.

* kj/repo-info-more-path-keys:
  repo: add path.cdup
  repo: add path.git-prefix
  repo: add path.grafts with absolute and relative suffixes
  repo: add path.index with absolute and relative suffixes
  repo: add path.hooks with absolute and relative suffixes
  repo: add path.superproject-root with absolute and relative suffixes
  submodule: use repository to find superproject
  repo: add path.toplevel with absolute and relative suffix formatting
2026-10-12 09:26:09 -07:00
Junio C Hamano f461ca490b Merge branch 'mm/line-log-limited-ops' into seen
The 'git log -L<range>:<path>' command has been taught to limit
various 'diff' operations, such as '--stat', '--check', and '-G', to
the specified range and path.

* mm/line-log-limited-ops:
  diffcore-pickaxe: limit -G to the -L tracked range
  diff: support --check with -L line ranges
  diff: support stat formats with -L
  diff: extract a line-range diff helper for reuse
  diff: emit -L hunk headers via xdiff's formatter
  diff: simplify the line-range filter by classifying removals immediately
  diff: rename line-range filter struct and clarify fields
2026-10-12 09:26:09 -07:00
Junio C Hamano d24c0868eb Merge branch 'tb/midx-incremental-custom-base' into seen
The 'git multi-pack-index write --incremental' command has been
corrected to properly honor the '--base' option.  Previously, the
custom base was ignored by the normal write path; packs from layers
above the selected base were incorrectly skipped by the pack exclusion
logic, and reachability closure for bitmaps was broken.

* tb/midx-incremental-custom-base:
  midx-write: include packs above custom incremental base
  midx: pass custom '--base' through incremental writes
  t5334: expose shared `nth_line()` helper
2026-10-12 09:26:08 -07:00
Junio C Hamano 54bdcc24d0 Merge branch 'pw/stash-change-check-only-once' into jch
"git stash create/push" checked if there are checks that need to be
saved twice, which has been reduced to just once.

* pw/stash-change-check-only-once:
  stash push: remove duplicate changes detection
  stash create: remove duplicate changes detection
2026-10-12 09:26:02 -07:00
Junio C Hamano 95c2e70341 Merge branch 'ps/repo-ref-storage-format-fix' into jch
The output of 'git repo info' has been updated to use
'references.storageFormat' instead of 'references.format' for
consistency with recent ref-storage-format terminology updates.

* ps/repo-ref-storage-format-fix:
  builtin/repo: rename "references.format" to "references.storageFormat"
2026-10-12 09:26:02 -07:00
Junio C Hamano 6cac51c287 Merge branch 'pw/checkout-m-conflict-labels' into jch
When recreating a merge conflict using 'git checkout -m', the
original conflict labels (such as branch names) were lost and
replaced with generic ones.  The merge machinery has been updated to
record the original labels in '.git/MERGE_LABELS', allowing 'git
checkout -m' to restore them.

* pw/checkout-m-conflict-labels:
  merge: remember conflict labels
  remove_branch_state: convert boolean argument to flags
2026-10-12 09:26:01 -07:00
Junio C Hamano f54644fb48 Merge branch 'cc/lazy-fetch-trusted-bit' into jch
A new 'uploadpack.lazyFetchTrusted' configuration variable has been
introduced to allow 'upload-pack' to lazily fetch missing objects from
configured promisor remotes when serving trusted repositories.

* cc/lazy-fetch-trusted-bit:
  builtin/upload-pack: don't disable lazy fetching on trusted repo
  promisor-remote: prevent infinite recursion when lazy fetching
  upload-pack: read uploadpack.lazyFetchTrusted
  setup: extract path_allowlist_apply()
  promisor-remote: factor out lazy_fetch_objects()
2026-10-12 09:26:01 -07:00
Junio C Hamano 13a8d85591 Merge branch 'dm/libsecret-explicit-load' into jch
The 'libsecret' credential helper has been updated to explicitly
load secrets instead of relying on the search flag, preventing
assertion failures when items are concurrently deleted or locked.

* dm/libsecret-explicit-load:
  credential/libsecret: load secrets explicitly
2026-10-12 09:26:01 -07:00
Junio C Hamano d764fe85a8 Merge branch 'hn/range-diff-matched-only' into jch
The 'git range-diff' command has been augmented with a
'--matched-only' option to skip commits that are only present on
one side, allowing users to easily focus on only the commits that
have been retained.

* hn/range-diff-matched-only:
  range-diff: add --matched-only to skip one-sided commits
2026-10-12 09:26:01 -07:00
Junio C Hamano 05cd339d9f Merge branch 'pp/midx-write-skip-empty' into jch
The `git multi-pack-index write` command has been updated to
silently return success when there are no object entries to index.
This avoids writing empty `multi-pack-index` layers, which
previously caused subsequent incremental midx writes using the
`--bitmap` option to fail when attempting to load the missing
reverse index.

* pp/midx-write-skip-empty:
  midx-write: skip writes with no object entries
2026-10-12 09:26:01 -07:00
Junio C Hamano 875edb153b Merge branch 'dw/config-read-both-global' into jch
The 'git config --global' read operations have been updated to
respect both '$HOME/.gitconfig' and '$XDG_CONFIG_HOME/git/config',
fixing an inconsistency where only the former was read when both
configuration files are present.

* dw/config-read-both-global:
  config: read global scope via config_sequence
  t1300: test list with missing global config
2026-10-12 09:26:00 -07:00
Junio C Hamano dbbafcc1e8 Merge branch 'vv/branch-recurse-no-start-ref' into jch
The --recurse-submodules option in 'git branch' has been fixed to
avoid a crash when the start point is not a reference (e.g., a raw
object ID).  The creation path now skips setting up tracking and
properly forwards the absent tracking name to the submodule helper.

* vv/branch-recurse-no-start-ref:
  branch: allow recursion with no tracking name
  branch: do not track a start point with no ref
2026-10-12 09:26:00 -07:00
Junio C Hamano 26afc3a1c4 Merge branch 'ap/http-preserve-wwwauth-redirect' into jch
When an HTTP request triggers a redirect and the target yields an
authentication challenge, the WWW-Authenticate headers received
during the redirect are now explicitly preserved across the
credential URL update, fixing an issue where they were incorrectly
cleared.

* ap/http-preserve-wwwauth-redirect:
  http: preserve wwwauth_headers across redirects
2026-10-12 09:26:00 -07:00
Junio C Hamano 90b8e6887c Merge branch 'ij/subtree-reject-v2-config' into jch
The shell script implementation of 'git subtree' has been updated to
check for the presence of the configuration file of the new Rust
implementation, preventing users from accidentally running the old
script on repositories already managed by the new tool.

* ij/subtree-reject-v2-config:
  git-subtree: Bail out if we find output from Rust rewrite (test)
  git-subtree: Bail out if we find output from Rust rewrite
2026-10-12 09:26:00 -07:00
Junio C Hamano 391cc7b1d6 Merge branch 'ss/repack-drop-filtered-dry-run' into jch
The '--dry-run' option of 'git repack --drop-filtered' used to
actually rebuild packs and delete redundant ones, which has been
corrected to only list the candidates without making changes.

* ss/repack-drop-filtered-dry-run:
  repack: do not rebuild packs on --dry-run
2026-10-12 09:25:59 -07:00
Junio C Hamano 165dbeec57 Merge branch 'jk/test-lazy-prereq-heredoc' into jch
The lazy prerequisite set-up script can be fed as a here-doc, just
like test_expect_{success,failure} scripts these days.

* jk/test-lazy-prereq-heredoc:
  test-lib: allow lazy prerequisite snippets as here-docs
2026-10-12 09:25:59 -07:00
Junio C Hamano 86e590fda6 ### match next 2026-10-12 09:25:59 -07:00
Junio C Hamano 1b1908ea63 Merge branch 'hn/t7004-flaky-gpg-test-fix' into jch
The test for verifying a signed tag with a missing key has been
updated to point GNUPGHOME to an unused directory rather than
deleting the active gpghome directory, working around a flaky rm
failure caused by the background gpg-agent observed on Alpine.

* hn/t7004-flaky-gpg-test-fix:
  t7004: check a missing key without deleting gpghome
2026-10-12 09:25:59 -07:00
Junio C Hamano c3551fc217 Merge branch 'je/status-merge-specific-help' into jch
"git status" now suggests to use 'git merge --continue', not 'git commit',
when done with conflicts during a 'git merge'.

* je/status-merge-specific-help:
  status: suggest `git merge --continue`, not `git commit`
2026-10-12 09:25:59 -07:00
Junio C Hamano 8482e47bf9 Merge branch 'ps/odb-files-alternates' into jch
The odb_source API has been refactored to make alternates an
implementation detail of the files backend instead of managing them
at the core object database layer.

* ps/odb-files-alternates:
  odb/source: drop `read_alternates` callback
  odb/source-files: move alternates into the backend
  odb/source-files: extract reading alternates
  odb/source: make `will_destroy` an implementation detail
  tmp-objdir: replace primary source at creation time
  tmp-objdir: manage quarantine as an object directory
  tmp-objdir: absorb logic to set and restore primary sources
  odb/source-files: add the ability to have multiple object dirs
  odb: refactor `odb_find_source()` to yield dirs
  odb: refactor `odb_for_each_alternate()` to yield dirs
  odb/source-files: introduce `struct odb_files_dir`
  commit-graph: stop depending on `struct odb_source`
  commit-graph: require resolved packfile paths for `stdin_packs`
2026-10-12 09:25:59 -07:00
Junio C Hamano 74e856aa03 Merge branch 'kk/fetch-write-commit-graph-incremental' into jch
The fetch.writeCommitGraph behavior has been optimized to
incrementally update the commit graph using only the newly fetched
commits as seeds.  This avoids a full reachability scan of all
references and drastically reduces the post-fetch commit-graph
update time for repositories with many references.

* kk/fetch-write-commit-graph-incremental:
  fetch: write commit-graph using updated refs only
  test-tool read-graph: add commit-info subcommand
2026-10-12 09:25:58 -07:00
Junio C Hamano ff768ec7f8 Merge branch 'kn/packed-refs-verbatim-write' into jch
The routine that rewrites the packed-refs file has been optimized to
directly pass unmodified reference records verbatim to the output
via fwrite(3p), instead of redundantly re-formatting them with
fprintf(3p).

* kn/packed-refs-verbatim-write:
  packed-refs: use `fwrite()` when passing refs verbatim
2026-10-12 09:25:58 -07:00
Junio C Hamano e270f9147a Merge branch 'ch/fetch-followremotehead-lazy-validation' into jch
Validation of the 'fetch.followRemoteHEAD' configuration variable
has been deferred to when it is actually used, preventing irrelevant
warnings during 'git fetch' invocations that do not consult it.

* ch/fetch-followremotehead-lazy-validation:
  fetch.c: defer fetch.followRemoteHEAD validation
2026-10-12 09:25:58 -07:00
Junio C Hamano b59d45a334 Merge branch 'ps/packfile-stale-delta-base-cache-fix' into jch
Closing a packfile did not evict the entries belonging to it from
the delta base cache, which could lead to data corruption when a
newly allocated packfile happened to reuse the same memory address.
The cache eviction logic has been updated to remove these stale
entries upon closing a pack

* ps/packfile-stale-delta-base-cache-fix:
  packfile: fix corruption due to stale delta base cache entries
  packfile: move around `close_pack()`
2026-10-12 09:25:58 -07:00
Junio C Hamano 45279f83f2 Merge branch 'dk/fix-shattered-io-link' into jch
Replace a link to a site that disappeared with a link to web archive
of the last known good copy.

* dk/fix-shattered-io-link:
  doc: fix shattered.io link
2026-10-12 09:25:57 -07:00
Junio C Hamano 321deca512 Merge branch 'ma/t0450-use-test-path-is-file' into jch
A test script (t0450) has been updated to use the test_path_is_file
and test_path_is_missing helper functions, which provides better
diagnostic output on failure.

* ma/t0450-use-test-path-is-file:
  t0450: use test_path_is_file and test_path_is_missing
2026-10-12 09:25:57 -07:00
Junio C Hamano 312027cedb Merge branch 'je/doc-section-7-synopsis' into jch
The requirement for a 'SYNOPSIS' section in section 7 manual pages
has been relaxed by updating the linter script, and dummy
'SYNOPSIS' sections from existing section 7 documentation have been
removed to improve the rendered output

* je/doc-section-7-synopsis:
  doc: don't require a SYNOPSIS in section 7
2026-10-12 09:25:57 -07:00
Junio C Hamano 4199cc15ab Merge branch 'jk/t5551-test-shell-quote-fix' into jch
The shell quoting of a lazy prereq script was quoted incorrectly and
allowed variables dereferenced at the wrong moment, breaking the
curl version detection.

* jk/t5551-test-shell-quote-fix:
  t5551: fix quoting in curl version bug prereq
2026-10-12 09:25:57 -07:00
Junio C Hamano a00cbe05ee Merge branch 'tz/doc-override-less-env' into jch
The documentation for core.pager has been updated to provide
examples of overriding the LESS environment variable for custom
pagers by prefixing the pager command in the configuration.

* tz/doc-override-less-env:
  doc: add more examples of overriding LESS in core.pager
2026-10-12 09:25:57 -07:00
Junio C Hamano 6a15bd6c32 Merge branch 'gm/filter-branch-state-map-fix' into jch
The commit map populated from the state branch in 'git
filter-branch' has been corrected to parse the map using the
original-to-rewritten order.

* gm/filter-branch-state-map-fix:
  filter-branch: fix commit map init from state branch
2026-10-12 09:25:56 -07:00
Junio C Hamano 40d5c3c400 Merge branch 'pw/stash-all-parseopt-fix' into jch
Fix definition for the "--all" option to use symbolic constant
in the options[] array passed to parse_options API.

* pw/stash-all-parseopt-fix:
  stash: use named constant when parsing "--all"
2026-10-12 09:25:56 -07:00
Junio C Hamano 156e0b9b3f Merge branch 'kh/format-patch-range-diff-notes' into jch
The 'format-patch' command has been updated with options to
configure notes specifically for range-diff output, allowing them to
differ from the notes displayed on the patches themselves.

* kh/format-patch-range-diff-notes:
  format-patch: learn --[no-]range-diff-notes
  format-patch: simplify get_notes_arg parameters
2026-10-12 09:25:56 -07:00
Junio C Hamano 946cc1e50a Merge branch 'kh/doc-trailers-cmd-examples' into jch
The documentation for 'git interpret-trailers' has been updated to
fix the grammatical errors in the descriptions of command examples.

* kh/doc-trailers-cmd-examples:
  doc: interpret-trailers: fix cmd examples
2026-10-12 09:25:56 -07:00
Junio C Hamano c94cf16a9d Merge branch 'mg/doc-remote-set-head' into jch
The documentation for 'git remote set-head' has been updated to
clarify that it only modifies the local repository's remote-tracking
symbolic reference, and does not alter the target remote
repository's own 'HEAD'.

* mg/doc-remote-set-head:
  doc: remote: say that it only affects the local repository
2026-10-12 09:25:56 -07:00
Junio C Hamano 9c555f4ddb Merge branch 'kz/doc-user-manual-typo' into jch
A grammatically incorrect capitalization in user-manual.adoc has
been corrected.

* kz/doc-user-manual-typo:
  doc: fix typo in user manual
2026-10-12 09:25:55 -07:00
Junio C Hamano e1fde7a744 Merge branch 'ps/parse-options-subcommand-groups' into jch
The parse-options API has been updated to support grouping
subcommands, and the 'git refs' command has been updated to use this
new feature to categorize its subcommands in its help output.

* ps/parse-options-subcommand-groups:
  builtin/refs: introduce subcommand groups
  parse-options: allow grouping subcommands
  parse-options: extract functions to print single option
  parse-options: fix completion format when first option is skipped
2026-10-12 09:25:55 -07:00
Junio C Hamano 7efcccbfc5 Merge branch 'hn/object-name-push-short' into jch
The @{upstream} notation had short-hand @{u} from the beginning,
and @{push} learned corresponding @{p} to match.

* hn/object-name-push-short:
  object-name: accept @{p} as short for @{push}
2026-10-12 09:25:55 -07:00
Junio C Hamano 08fce9f716 Merge branch 'bc/git-contacts-stdin' into jch
The 'git-contacts' program (in contrib/) has been taught to read
patches from the standard input stream when an explicit dash ('-') is
passed in place of a file.

* bc/git-contacts-stdin:
  git-contacts: allow inputting patch via stdin
2026-10-12 09:25:55 -07:00
Junio C Hamano 69e5bf7be3 Merge branch 'ap/var-broken-down-idents' into jch
The 'git var' command has been updated to output individual components
of the author and committer identities, take multiple keys on the
command-line, and support NUL-delimited output with the '-z' option.

* ap/var-broken-down-idents:
  var: add broken-out identity variables
  var: accept more than one variable
  var: add "-z" output mode
  var: represent multi-valued variables with a string_list
2026-10-12 09:25:54 -07:00
Junio C Hamano 3d9b74f5aa Merge branch 'dk/stash-apply-index-incore' into jch
The handling of index conflicts in 'git stash apply --index' has
been optimized.  Instead of relying on expensive external
subprocesses using 'git diff-tree' and 'git apply', the index is now
merged in-core using the merge-ort machinery, which fixes a
concurrent lock file issue with autostash.

* dk/stash-apply-index-incore:
  builtin/stash: merge index in-core
  t3903: test failed "stash apply --index"
  stash: prepare merge options earlier
  builtin/stash: remove unused header
2026-10-12 09:25:54 -07:00
Junio C Hamano 13867e29bc Merge branch 'jk/xdiff-size_t' into jch
The internal diff and merge machinery has been updated to use
standard size_t types rather than signed longs for buffer
allocations and offsets, preventing subtle overflow issues on LLP64
architectures, and plugging uninitialized memory leaks along error
paths.

* jk/xdiff-size_t:
  merge-ll: report an error when reading external merge results fails
  merge-ll: handle external driver status before reading result
  merge-ll: use read_mmfile() to read external merge results
  xdiff: NUL-terminate buffers read by read_mmfile()
  xdiff: use size_t for buffer sizes
  xdiff: replace mmbuffer_t with mmfile_t
  xdiff: clean up read_mmfile() allocations on error
2026-10-12 09:25:54 -07:00
Junio C Hamano 6ca50a101f Merge branch 'ps/reftable-reflog-timezone' into jch
The internal representation of timezones in the reflog for the
reftable format has been fixed to match the specification, which
dictates an offset in minutes rather than the parsed "+HHMM" integer
representation.

* ps/reftable-reflog-timezone:
  refs/reftable: fix on-disk representation of reflog timezones
  t/helper: fix segfault in "dump-reftable -t"
  date: add helpers to convert between "+HHMM" timezones and minutes
2026-10-12 09:25:54 -07:00
Junio C Hamano 495804f19d Merge branch 'tb/t5520-reflog-expire' into jch
The `t5520` test script has been updated to disable reflog expiration.
This prevents test flakiness caused by the auto-maintenance
reflog-expire task, which would otherwise immediately expire the
test's reflogs due to them carrying hardcoded timestamps from 2005.

* tb/t5520-reflog-expire:
  t5520: don't expire reflogs where it matters
2026-10-12 09:25:53 -07:00