Commit Graph

82685 Commits (a7083008cd3c124a03dbeb9aae257d91ef82aa5a)

Author SHA1 Message Date
Junio C Hamano a7083008cd Merge branch 'hn/status-push-rebased-on-newer-upstream' into seen
The 'git status' output and 'git push' rejection advice have been
improved to recognize when a pushed branch was cleanly rebased onto
a newer upstream, and now correctly suggest force-pushing instead of
pulling.

* hn/status-push-rebased-on-newer-upstream:
  push: suggest a force push after a clean rebase
  push: offer a force push after rewriting pushed commits
  push: name the branch to pull from when it is not the upstream
  status: suggest a force push after a clean rebase
  status: say when the push branch was rebased cleanly
  status: count push divergence outside the upstream
2026-10-12 09:26:15 -07:00
Junio C Hamano e59c422bfb Merge branch 'ik/fsmonitor-untracked-cache-trivial-response' into seen
The index writer has been taught to check the untracked cache
against the filesystem when an FSMonitor trivial response is
received, preventing commands like 'git add' from saving a new token
while leaving stale untracked cache entries intact.

* ik/fsmonitor-untracked-cache-trivial-response:
  fsmonitor: check the untracked cache after a trivial response
2026-10-12 09:26:14 -07:00
Junio C Hamano f09e2f0cc4 Merge branch 'ss/history-sign-rewrites' into seen
The git history command and its subcommands have been updated to
honor the commit.gpgSign configuration variable and accept the
--gpg-sign and --no-gpg-sign command-line options, ensuring both
rewritten commits and their replayed descendants are
cryptographically signed by the committer.

* ss/history-sign-rewrites:
  history: sign rewritten commits
  replay: allow callers to sign commits
2026-10-12 09:26:14 -07:00
Junio C Hamano a0c87fc8b3 Merge branch 'hn/ci-leak-sanitizer-annotations' into seen
CI on GitHub Actions gets a better annotation experience.  Leak test
scripts are stopped at their first failure with --immediate to
prevent flooding the log, and failures are correctly annotated with
their file and line number.

* hn/ci-leak-sanitizer-annotations:
  ci: point test failures and fixed known breakages at their file and line
  ci: annotate leaks and stop a leak-sanitizer script at its first failure
2026-10-12 09:26:14 -07:00
Junio C Hamano 6ee386419b Merge branch 'am/p4-apply-commit-shell-injection-fix' into seen
The `applyCommit()` function inside 'git-p4.py' has been updated to
use direct subprocess pipes in order to avoid shell interpolation,
plugging a potential shell injection vulnerability when processing
commit IDs.

* am/p4-apply-commit-shell-injection-fix:
  git-p4: avoid shell interpretation of commit ids in applyCommit
2026-10-12 09:26:13 -07:00
Junio C Hamano 51e5f306b1 Merge branch 'td/ls-files-untracked-cache' into seen
The git ls-files command has been optimized to reuse and populate
the untracked cache for the working tree, and untracked cache
implementations have been updated to share identical caches across
-unormal and -uall outputs, avoiding redundant filesystem
traversals.

* td/ls-files-untracked-cache:
  ls-files: use and update the untracked cache
  dir: share untracked caches across output modes
  dir: hash ignore files before appending newline
2026-10-12 09:26:13 -07:00
Junio C Hamano bf970699c6 Merge branch 'hn/shallow-history-advice' into seen
Providing advice when ~<n> or ^<n> resolves to a commit whose
parents are missing due to the repository being a shallow clone,
instead of an unhelpful 'not a commit' error.

* hn/shallow-history-advice:
  object-name: explain why <rev>~N fails in a shallow clone
2026-10-12 09:26:13 -07:00
Junio C Hamano d644296348 Merge branch 'mc/refs-hook-report-old-values' into seen
The 'reference-transaction' hook has been updated to report the
observed old object IDs and symref targets for unconditional ref
updates and deletions, instead of reporting the null object ID.

* mc/refs-hook-report-old-values:
  refs: report old values to transaction hooks
2026-10-12 09:26:13 -07:00
Junio C Hamano f573d758b5 Merge branch 'ec/commit-fixup-options' into seen
Support for '-m', '-F', '-c', or '-C' options to supply a commit log
message from outside the editor has been added for all 'git commit
--fixup' variations.

* ec/commit-fixup-options:
  commit: allow -c/-C for all kinds of --fixup
  commit: allow -m/-F for all kinds of --fixup
2026-10-12 09:26:12 -07:00
Junio C Hamano bd39d365e6 Merge branch 'mh/rust-crate-subdir' into seen
The Rust code and its 'Cargo.toml' file have been moved from the
top-level repository root and 'src/' directory into a dedicated
'rust/' subdirectory.  This avoids confusing Cargo's packaging
mechanism when the Git repository is included as a submodule in
other Rust projects.

* mh/rust-crate-subdir:
  move rust gitcore crate to a different subdirectory
2026-10-12 09:26:12 -07:00
Junio C Hamano 7df76b29b6 Merge branch 'bs/runtime-prefix-obsd-getexecpath' into seen
Git on OpenBSD historically lacked an authoritative mechanism to
resolve its executable path, as it doesn't support the
KERN_PROC_PATHNAME sysctl.  With OpenBSD 8.0 introducing
getexecpath(3), it is now utilized to provide proper RUNTIME_PREFIX
resolution instead of relying on argv[0] fallback.

* bs/runtime-prefix-obsd-getexecpath:
  exec_cmd: RUNTIME_PREFIX on OpenBSD systems
2026-10-12 09:26:12 -07:00
Junio C Hamano 8ed3e58b2a Merge branch 'jc/advice-config-set-global' into seen
The advice subsystem has been updated to suggest using the
'--global' option when recommending a command snippet to squelch
future advice messages, since global configuration is generally
more appropriate for user-level preferences than per-repository
settings.

* jc/advice-config-set-global:
  advice: give cut-and-pasteable advice to squelch
2026-10-12 09:26:12 -07:00
Junio C Hamano 8b25937380 Merge branch 'tb/rerere-wait-for-merge-rr-lock' into seen
Instead of failing to record conflicts to be resolved immediately,
wait while "rerere gc" is ongoing.

* tb/rerere-wait-for-merge-rr-lock:
  rerere: add "gc --skip-locked" for auto maintenance
  rerere: wait for MERGE_RR.lock before giving up
2026-10-12 09:26:11 -07:00
Junio C Hamano 0ed3396478 Merge branch 'tc/push-force-if-includes-fixes' into seen
The '--force-if-includes' protection for 'git push' has been updated
to consult the reflog of the local branch being pushed, rather than
incorrectly checking the reflog of a local branch that shares the name
of the remote destination branch.  The push advice for detached HEAD
scenarios has also been adjusted to indicate that the remote ref
cannot be verified locally.  A regression that caused perfectly valid
fast-forward pushes to be rejected when reflogs were expired has been
fixed.

* tc/push-force-if-includes-fixes:
  push: --force-if-includes should allow fast-forward
  push: fix --force-if-includes non-branch advice
  push: check pushed ref for --force-if-includes
2026-10-12 09:26:11 -07:00
Junio C Hamano 04d2690ee2 Merge branch 'mm/diff-process-hunks' into seen
A new 'diff.<driver>.process' configuration has been introduced to
allow a long-running external process to act as a hunk provider,
enabling external tools to control which lines Git considers changed
while leaving all output formatting (word diff, color, blame, etc.) to
Git's standard pipeline.

* mm/diff-process-hunks:
  fixup! diff: consult oid-only hunk providers via diff.<driver>.process
  diff: consult oid-only hunk providers via diff.<driver>.process
  userdiff: add diff.<driver>.process config
  sub-process: add a gentle status read
  sub-process: separate process lifecycle from hashmap management
  blame: read precomputed hunks
  diff: read precomputed hunks for stat output
  diff: record precomputed hunks during stat output
  diff-hunks: add the store format, library, and command
  diff: introduce a hunk provider interface
  gitattributes: document how external diff drivers relate to diff features
2026-10-12 09:26:11 -07:00
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