Commit Graph

82056 Commits (44df3a3ec53aa89dfdb4977f2f2ae7c80efcd467)

Author SHA1 Message Date
Junio C Hamano 44df3a3ec5 Merge branch 'tn/packfile-uri-concurrency' into next
Concurrent downloads of packfiles via packfile URIs and dumb HTTP are
safer by avoiding concurrent appends to the staging file.  Opening in
read-write mode with separate file offsets prevents corruption and
preserves resumability.  'fetch-pack' now tolerates pre-existing
'.keep' files.

* tn/packfile-uri-concurrency:
  fetch-pack: accept "pack" output for packfile URIs
  http: permit unlinking partial packs on Windows
  http: avoid concurrent appends to partial packs
  http: accept HTTP 416 for complete partial packs
  http: avoid closing index-pack input twice
  http-fetch: correct --index-pack-arg documentation
2026-08-08 10:21:21 -07:00
Junio C Hamano ea8486f2a7 Merge branch 'jm/t0213-skip-emulated-ancestry-tests' into next
The 'TRACE2_ANCESTRY' prerequisite in the 't0213' test script has been
refined to avoid failures under user-mode emulation by verifying that
the ancestry collector reports the expected process names rather than
the emulator binary name.

* jm/t0213-skip-emulated-ancestry-tests:
  t0213: skip ancestry tests under user-mode emulation
2026-08-08 10:21:21 -07:00
Junio C Hamano b54405d56f Sync with 'master' 2026-08-07 14:48:50 -07:00
Junio C Hamano 010afd3166 The 12th batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-08-07 14:48:01 -07:00
Junio C Hamano 262508d27a Merge branch 'ds/sparse-index-ita-crash'
A crash in the 'sparse-index' collapse code when encountering an
invalidated cache-tree node (due to an intent-to-add path) has been
fixed by avoiding collapsing such subtrees.

* ds/sparse-index-ita-crash:
  sparse-index: avoid crash on intent-to-add entry outside the cone
2026-08-07 14:48:01 -07:00
Junio C Hamano b12f37d600 Merge branch 'dl/pack-bitmap-position-zero'
A boundary case check in reachability bitmap traversal has been
corrected to properly handle the object at position zero, which was
previously skipped, leading to redundant bitmap loading.

* dl/pack-bitmap-position-zero:
  pack-bitmap: handle objects at bitmap position zero
2026-08-07 14:48:01 -07:00
Junio C Hamano aa2932aedd Merge branch 'tc/merge-default-to-upstream-leakfix'
A memory leak in 'git merge' when run without arguments (which
triggers the default-to-upstream path) has been fixed.  A test has
been added to cover this case.

* tc/merge-default-to-upstream-leakfix:
  merge: fix leak with merge.defaultToUpstream
2026-08-07 14:48:01 -07:00
Junio C Hamano 93a85701ab Merge branch 'jk/cat-file-batch-wo-type-fix'
'git cat-file --batch-command' that asked for 'contents' without
'type' segfaults, which has been corrected.

* jk/cat-file-batch-wo-type-fix:
  cat-file: handle content request for --batch-command without type
2026-08-07 14:48:00 -07:00
Junio C Hamano ef11815b1e Merge branch 'mm/revision-pure-get-commit-action'
The get_commit_action() function has been refactored to be a pure
predicate by moving the side-effecting line-level log range folding to
simplify_commit().  This ensures that evaluating a commit's action
before the walk reaches it does not prematurely mutate its tracked
line ranges, making it safer for potential lookahead evaluations.

* mm/revision-pure-get-commit-action:
  revision: make get_commit_action() a pure predicate
2026-08-07 14:48:00 -07:00
Junio C Hamano babe559ffb Merge branch 'jk/diff-relative-cached-unmerged-more'
The code path that deals with relative paths in the 'diff-lib' has
been cleaned up.

* jk/diff-relative-cached-unmerged-more:
  diff-lib: skip paths outside prefix in oneway_diff()
  diff-lib: drop stale comment about advancing o->pos
2026-08-07 14:48:00 -07:00
Junio C Hamano c56d675ccc Sync with 'master' 2026-08-05 11:12:48 -07:00
Junio C Hamano 2c78326f81 The 11th batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-08-05 11:10:52 -07:00
Junio C Hamano c165f38e4a Merge branch 'js/mingw-symlink-net-share-leak'
Git for Windows has been updated to avoid auto-detecting the symlink
type if the target path starts with a slash, preventing NTLM
credential leaks when checking out repositories with crafted
symbolic links pointing to network shares.

* js/mingw-symlink-net-share-leak:
  mingw: skip symlink type auto-detection for network share targets
2026-08-05 11:10:52 -07:00
Junio C Hamano 7943c6b110 Merge branch 'jk/t0014-dynamic-deprecated-cmds'
The alias tests in 't/t0014-alias.sh' have been updated to dynamically
query the list of deprecated commands using 'git
--list-cmds=deprecated' to avoid test failures when running with
'WITH_BREAKING_CHANGES' in a build directory that contains stale
executables of formerly deprecated commands.

* jk/t0014-dynamic-deprecated-cmds:
  t0014: generate deprecated command names dynamically
  t0014: factor out choice of deprecated commands
2026-08-05 11:10:52 -07:00
Junio C Hamano 2816039db0 Merge branch 'jk/ci-static-analysis-image-bump'
The image version used by the static-analysis CI job has been bumped
to ubuntu-latest (Ubuntu 24.04), which brings in a newer Coccinelle
version that resolves a severe performance regression.  A false
positive warning from the 'CHECK_ASSERTION_SIDE_EFFECTS' build with
GCC 15 in the Bloom filter code has also been silenced to facilitate
the image upgrade.

* jk/ci-static-analysis-image-bump:
  ci: bump ubuntu image version for static-analysis job
  bloom: silence CHECK_ASSERTION_SIDE_EFFECTS false positive
2026-08-05 11:10:51 -07:00
Junio C Hamano 67b1d2fa43 Merge branch 'rs/branch-delete-bisect-warning'
'git branch -d' has been taught to report when a branch cannot be
deleted because it is being used in an active bisect run.

* rs/branch-delete-bisect-warning:
  branch: report active bisect run when rejecting delete
2026-08-05 11:10:51 -07:00
Junio C Hamano 82c48eae1f Merge branch 'ps/odb-pluggable-housekeeping'
Object database housekeeping in 'git gc' and 'git maintenance' has
been refactored to be pluggable.  The files-backend-specific logic,
including incremental and geometric repacking as well as object
pruning, has been moved out of the command implementation and into the
files object database source, enabling future alternative object
database backends to implement their own housekeeping services.

* ps/odb-pluggable-housekeeping:
  odb: make optimizations pluggable
  builtin/gc: fix signedness issues in ODB-related functionality
  builtin/gc: refactor ODB optimizations to operate on "files" source
  builtin/gc: introduce `odb_optimize_required()`
  builtin/gc: move geometric repacking into `odb_optimize()`
  builtin/gc: introduce object database optimization options
  builtin/gc: inline config values specific to the "files" backend
  builtin/gc: make repack arguments self-contained
  builtin/gc: extract object database optimizations into separate function
  builtin/gc: move worktree and rerere tasks before object optimizations
  odb: run "pre-auto-gc" hook for all maintenance tasks
  t7900: simplify how we check for maintenance tasks
2026-08-05 11:10:51 -07:00
Junio C Hamano 524d5ad5ed Merge branch 'pw/rebase-fixup-fixes'
Two bugs in how 'git rebase' handles skipped 'fixup' and 'squash'
commands have been fixed.  One bug caused an incorrect commit count to
be shown in the template message when multiple commands were skipped,
and another prevented the editor from opening when the final command
in a chain containing 'fixup -c' was skipped.

* pw/rebase-fixup-fixes:
  rebase: remember fixup -c after skipping fixup/squash
  rebase -i: fix counting of fixups after rebase --skip
2026-08-05 11:10:51 -07:00
Junio C Hamano f072d0e4a2 Merge branch 'jk/diff-relative-cached-unmerged'
'git diff --relative' running with '--cached' has been corrected to
avoid a segfault when encountering unmerged paths outside the
prefix.

* jk/diff-relative-cached-unmerged:
  diff-lib: add idx/tree sanity check to oneway_diff
  diff: ignore unmerged paths outside prefix with --relative --cached
2026-08-05 11:10:51 -07:00
D. Ben Knoble 7a403c3ee5 mailmap: change primary address for D. Ben Knoble
Ben uses the +github GMail trick to identify emails sent to him by folks
that found his GitHub profile. At the time, that also meant he had to
commit under the same email for GitHub to recognize his commits. He has
since found out that GitHub can be configured with more than one email
for identification, and he would prefer his canonical email to omit
mention of GitHub (where it's not relevant) going forward.

Signed-off-by: D. Ben Knoble <ben.knoble@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-08-05 06:06:08 -07:00
Junio C Hamano 92bfe2ec32 Sync with 'master' 2026-08-04 11:22:59 -07:00
Christian Couder 6375b40aea mailmap: change primary address for Christian Couder
The `chriscool@tuxfamily.org` address is an old one that I don't use
anymore, while `christian.couder@gmail.com` is the address I have been
sending patches from for a long time.

Let's swap the two addresses in the existing entry, so that the Gmail
address becomes the primary one and the old tuxfamily.org address is
mapped to it. This way both addresses still resolve to the same person,
and the address I actually use is the canonical one.

Signed-off-by: Christian Couder <christian.couder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-08-03 13:12:08 -07:00
Junio C Hamano 6767b8d81c Sync with 'master' 2026-08-03 09:33:19 -07:00
Junio C Hamano cf2c4e00eb Merge branch 'ns/merge-base-is-ancestor-tests' into next
Tests for 'git merge-base --is-ancestor' have been added to cover
exit codes (0 for success, 1 for non-ancestor, 128 for errors) and
to ensure it cannot be combined with '--all'.

* ns/merge-base-is-ancestor-tests:
  merge-base: add tests for --is-ancestor
2026-08-03 09:33:12 -07:00
Junio C Hamano 7643cf1c2a Merge branch 'lo/mv-missing-dest-dir-check' into next
'git mv' has been updated to check for a missing destination
leading directory during the checking phase, allowing 'git mv -n'
to report the failure.  The error message when the rename(2)
syscall fails has also been improved to name both the source and
the destination.

* lo/mv-missing-dest-dir-check:
  mv: reject a destination whose leading path is missing or a symlink
  mv: name both source and destination when rename fails
2026-08-03 09:33:11 -07:00
Junio C Hamano 5450adb2e1 Merge branch 'kh/doc-replay-config' into next
Documentation for 'git replay' has been updated to refer to its
configuration variables.

* kh/doc-replay-config:
  doc: replay: move “default” to the right-hand side
  doc: replay: use a nested description list
  doc: replay: improve config description
  doc: link to config for git-replay(1)
2026-08-03 09:33:11 -07:00
Junio C Hamano ce42e63135 Merge branch 'sk/test-commit-body-helper' into next
A new test helper commit_body() has been introduced to print the
message body of a commit, and various tests have been updated to use
it instead of spelling out the command pipeline manually and losing
the exit status of the 'git cat-file' command on the upstream of the
pipe.

* sk/test-commit-body-helper:
  t: use commit_body to extract commit message bodies
  test-lib-functions: add commit_body helper
2026-08-03 09:33:11 -07:00
Junio C Hamano c744bba04e Merge branch 'ja/doc-synopsis-style-yet-more' into next
Synopsis and options in the documentation for 'git format-patch',
'git imap-send', 'git send-email', and 'git request-pull' have been
updated to the modern style.

* ja/doc-synopsis-style-yet-more:
  doc: convert git-request-pull synopsis and options to new style
  doc: convert git-send-email synopsis and options to new style
  doc: convert git-format-patch synopsis and options to new style
  doc: convert git-imap-send synopsis and options to new style
2026-08-03 09:33:11 -07:00
Junio C Hamano 5b2471720c The 10th batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-08-03 09:31:30 -07:00
Junio C Hamano 5f9197ea67 Merge branch 'en/submodule-insteadof-remote-match'
The remote-matching logic for submodules has been corrected to resolve
'url.*.insteadOf' aliases before comparing the inventoried URL from
'.gitmodules' with the URLs of configured remotes.

* en/submodule-insteadof-remote-match:
  submodule: resolve insteadOf aliases when matching remote
2026-08-03 09:31:30 -07:00
Junio C Hamano 410066f8e0 Merge branch 'jc/remote-insteadof-leakfix'
rewrites_release() in 'remote.c' has been updated to free 'struct
rewrite' instances, their '.instead_of' arrays, and their contents.

* jc/remote-insteadof-leakfix:
  remote: plug memory leaks
2026-08-03 09:31:30 -07:00
Junio C Hamano ffdf498492 Merge branch 'af/clone-revision-v0-segfault-fix'
A segfault when 'git clone --revision' talks to a server that does not
support protocol v2 (falling back to protocol v0) has been corrected.

* af/clone-revision-v0-segfault-fix:
  builtin/clone: fix segfault when using --revision with protocol v0
2026-08-03 09:31:29 -07:00
Junio C Hamano e2753febd9 Merge branch 'jc/exclude-first-parent-seen'
Traversals with '--exclude-first-parent-only' have been corrected
to properly stop after the first parent even when it has already
been marked as 'SEEN'.

* jc/exclude-first-parent-seen:
  revision: honor --exclude-first-parent-only with SEEN first parent
2026-08-03 09:31:29 -07:00
Junio C Hamano 24e4e2ef8b Merge branch 'hn/url-push-tracking'
When the push remote is specified as a URL, the fetch refspec of a
uniquely matching configured remote is now used to find and update
the remote-tracking branch (e.g., '@{push}').

* hn/url-push-tracking:
  remote: find tracking branches for URL push destinations
  remote: pass repository to push tracking helper
2026-08-03 09:31:29 -07:00
Junio C Hamano 21b8a5bc05 Merge branch 'ds/sparse-index-ita-crash' into next
A crash in the 'sparse-index' collapse code when encountering an
invalidated cache-tree node (due to an intent-to-add path) has been
fixed by avoiding collapsing such subtrees.

* ds/sparse-index-ita-crash:
  sparse-index: avoid crash on intent-to-add entry outside the cone
2026-07-31 08:55:07 -07:00
Junio C Hamano b200bed995 Merge branch 'dl/pack-bitmap-position-zero' into next
A boundary case check in reachability bitmap traversal has been
corrected to properly handle the object at position zero, which was
previously skipped, leading to redundant bitmap loading.

* dl/pack-bitmap-position-zero:
  pack-bitmap: handle objects at bitmap position zero
2026-07-31 08:55:07 -07:00
Junio C Hamano b10497d8a4 Merge branch 'tc/merge-default-to-upstream-leakfix' into next
A memory leak in 'git merge' when run without arguments (which
triggers the default-to-upstream path) has been fixed.  A test has
been added to cover this case.

* tc/merge-default-to-upstream-leakfix:
  merge: fix leak with merge.defaultToUpstream
2026-07-31 08:55:07 -07:00
Junio C Hamano 2d67bd3ccf Merge branch 'jk/cat-file-batch-wo-type-fix' into next
'git cat-file --batch-command' that asked for 'contents' without
'type' segfaults, which has been corrected.

* jk/cat-file-batch-wo-type-fix:
  cat-file: handle content request for --batch-command without type
2026-07-31 08:55:07 -07:00
Junio C Hamano ae6730749f Merge branch 'mm/revision-pure-get-commit-action' into next
The get_commit_action() function has been refactored to be a pure
predicate by moving the side-effecting line-level log range folding to
simplify_commit().  This ensures that evaluating a commit's action
before the walk reaches it does not prematurely mutate its tracked
line ranges, making it safer for potential lookahead evaluations.

* mm/revision-pure-get-commit-action:
  revision: make get_commit_action() a pure predicate
2026-07-31 08:55:06 -07:00
Junio C Hamano 9ab258b957 Sync with 'master' 2026-07-30 10:45:04 -07:00
Junio C Hamano d8636bd744 Merge branch 'jk/diff-relative-cached-unmerged-more' into next
The code path that deals with relative paths in the diff-lib has
been cleaned up.

* jk/diff-relative-cached-unmerged-more:
  diff-lib: skip paths outside prefix in oneway_diff()
  diff-lib: drop stale comment about advancing o->pos
2026-07-30 10:44:56 -07:00
Junio C Hamano a97fcc37c2 The 9th batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-07-30 10:32:05 -07:00
Junio C Hamano d407e69787 Merge branch 'ps/odb-move-loose-object-writing'
The logic to write loose objects has been refactored and moved from
'object-file.c' to the loose backend source file 'odb/source-loose.c',
making the loose backend more self-contained.  This is achieved by
first refactoring force_object_loose() to use generic ODB write
interfaces instead of loose-backend internals.

* ps/odb-move-loose-object-writing:
  object-file: move logic to write loose objects
  object-file: move `force_object_loose()`
  object-file: force objects loose via generic interface
  object-file: fix memory leak in `force_object_loose()`
  odb: support setting mtime when writing objects
  odb: lift object existence check out of the "loose" backend
  odb: compute object hash in `odb_write_object_ext()`
  t/u-odb-inmemory: implement wrapper for writing objects
  odb: compute compat object ID in `odb_write_object_ext()`
2026-07-30 10:32:05 -07:00
Junio C Hamano 554ef2522c Merge branch 'tl/gitweb-shorten-hashes-with-modes'
The object ID shortening and linking in the 'commitdiff' view of
'gitweb' has been corrected to work even when the index line carries
a trailing file mode.

* tl/gitweb-shorten-hashes-with-modes:
  gitweb: shorten index hashes with trailing file modes
2026-07-30 10:32:04 -07:00
Junio C Hamano e1fb641cfa Merge branch 'ps/cat-file-remote-object-info'
The 'remote-object-info' command has been added to 'git cat-file
--batch-command', allowing clients to request object metadata
(currently size) from a remote server via protocol v2 without
downloading the entire object.  Format placeholders are dynamically
filtered on the client based on server-advertised capabilities,
returning empty strings for inapplicable or unsupported fields.

* ps/cat-file-remote-object-info:
  cat-file: make remote-object-info allow-list adapt to the server
  cat-file: add remote-object-info to batch-command
  transport: add client support for object-info
  serve: advertise object-info feature
  protocol-caps: check object existence regardless of the attributes requested
  fetch-pack: move fetch initialization
  connect: make write_fetch_command_and_capabilities() more generic
  fetch-pack: move write_fetch_command_and_capabilities() to connect.c
  fetch-pack: use unsigned int for hash_algo variable
  fetch-pack: drop the static advertise_sid variable
  t1006: extract helper functions into new 'lib-cat-file.sh'
  cat-file: declare loop counter inside for()
  transport-helper: fix memory leak of helper on disconnect
2026-07-30 10:32:04 -07:00
Junio C Hamano ab7ed92d6c Merge branch 'jt/config-lock-timeout'
Configuration file locking has been updated to retry for a short
period, avoiding failures when multiple processes attempt to update
the configuration simultaneously.

* jt/config-lock-timeout:
  config: retry acquiring config.lock, configurable via core.configLockTimeout
2026-07-30 10:32:04 -07:00
Junio C Hamano 50f7f93213 Merge branch 'tn/stash-avoid-sparse-index-expansion'
The 'git stash push' command has been optimized to avoid unnecessary
sparse index expansion when pathspecs are wholly inside the
sparse-checkout cone.  Also, a potential out-of-bounds read in the
sparse-index expansion check helper pathspec_needs_expanded_index()
has been fixed by consistently using the parsed, prefixed path.

* tn/stash-avoid-sparse-index-expansion:
  stash: avoid sparse-index expansion for in-cone paths
  pathspec: use match for sparse-index expansion checks
2026-07-30 10:32:03 -07:00
Junio C Hamano da12976c77 Merge branch 'sk/userdiff-swift'
Userdiff patterns for Swift have been added, with support for
Swift-specific constructs such as attributes, modifiers, failable
initializers, and generics.

* sk/userdiff-swift:
  userdiff: add support for Swift
2026-07-30 10:32:03 -07:00
Junio C Hamano fc1e7582e6 Merge branch 'ty/migrate-excludes-file'
The 'excludes_file' and various other global configuration variables
(including 'editor_program', 'pager_program', 'askpass_program', and
'push_default') have been migrated into the per-repository structure.

* ty/migrate-excludes-file:
  repository: adjust the comment of config_values_private_
  environment: move object_creation_mode into repo_config_values
  environment: move autorebase into repo_config_values
  environment: move push_default into repo_config_values
  environment: migrate apply_default_whitespace and apply_default_ignorewhitespace
  environment: move askpass_program into repo_config_values
  environment: move pager_program into repo_config_values
  environment: move editor_program into repo_config_values
  environment: move excludes_file into repo_config_values
  repository: introduce repo_config_values_clear()
2026-07-30 10:32:03 -07:00
Junio C Hamano 48d45c7a41 Merge branch 'ty/migrate-trust-executable-bit'
The 'trust_executable_bit' (coming from the 'core.filemode'
configuration) has been migrated into 'struct repo_config_values' to
tie it to a specific repository instance.

* ty/migrate-trust-executable-bit:
  environment: move has_symlinks into repo_config_values
  environment: move trust_executable_bit into repo_config_values
  read-cache: pass 'repo' to 'ce_mode_from_stat()'
  read-cache: remove redundant extern declarations
2026-07-30 10:32:02 -07:00