79789 Commits

Author SHA1 Message Date
Junio C Hamano
5f07669af4 Merge branch 'ms/doc-worktree-side-by-side' into seen
Document "git worktree add" and use of out-of-tree worktrees with
examples.

* ms/doc-worktree-side-by-side:
  doc: git-worktree: Add side by side branch checkout example
  doc: git-worktree: Link to examples
2026-01-19 16:53:28 -08:00
Junio C Hamano
e5e742a9b3 Merge branch 'jk/parse-int' into seen
Introduce a more robust way to parse a decimal integer stored in a
piece of memory that is not necessarily terminated with NUL (which
Asan strict-string-check complains even when use of strtol() is
safe due to varified existence of whitespace after the digits).

* jk/parse-int:
  fsck: use parse_unsigned_from_buf() for parsing timestamp
  cache-tree: use parse_int_from_buf()
  parse: add functions for parsing from non-string buffers
  parse: prefer bool to int for boolean returns
2026-01-19 16:53:27 -08:00
Junio C Hamano
eb716c999b Merge branch 'tc/last-modified-options-cleanup' into seen
The "-z" and "--max-depth" documentation (and implementation of
"-z") in the "git last-modified" command have been updated.

* tc/last-modified-options-cleanup:
  last-modified: change default max-depth to 0
  last-modified: add option '--max-depth' to help output
  last-modified: document option --max-depth
  last-modified: add option '-z' to help output
  last-modified: document NUL termination
2026-01-19 16:53:26 -08:00
Junio C Hamano
0d1928f7bb ### Overdue reroll 2026-01-19 16:53:26 -08:00
Junio C Hamano
0be11ea2b3 Merge branch 'sp/shallow-time-boundary' into seen
The set of shallow boundary "git clone --shallow-since" leaves
contained commits that are not on the boundary, which has been
corrected.

* sp/shallow-time-boundary:
  shallow: set borders which are all reachable after clone shallow since
2026-01-19 16:53:26 -08:00
Junio C Hamano
e0c6864e85 Merge branch 'jc/exclude-with-gitignore' into seen
"git add ':(exclude)foo.o'" is clearly a request not to add 'foo.o',
but the command complained about listing an ignored path foo.o on
the command line, which has been corrected.

* jc/exclude-with-gitignore:
  dir.c: do not be fooled by :(exclude) pathspec elements
2026-01-19 16:53:26 -08:00
Junio C Hamano
d65713c86b Merge branch 'yc/histogram-hunk-shift-fix' into seen
The final clean-up phase of the diff output could turn the result of
histogram diff algorithm suboptimal, which has been corrected.

Comments?  We do want a real review around here...
cf. <CALnO6CC3WTBjaLR7yAr-w5eaqzyd2qF5MAyfV2wQY3+TDEbEsw@mail.gmail.com>

* yc/histogram-hunk-shift-fix:
  xdiff: re-diff shifted change groups when using histogram algorithm
2026-01-19 16:53:24 -08:00
Junio C Hamano
25dc581e49 Merge branch 'kn/ref-location' into seen
A mechanism to specify what reference backend to use and store
references in which directory is introduced, which would likely to
be useful during ref migration.

* kn/ref-location:
  refs: add GIT_REF_URI to specify reference backend and directory
  refs: support obtaining ref_store for given dir
2026-01-19 16:53:24 -08:00
Junio C Hamano
2e77fef1b4 ### Not enough discussion 2026-01-19 16:53:24 -08:00
Junio C Hamano
691e0b4646 Merge branch 'bc/sha1-256-interop-02' into seen
The code to maintain mapping between object names in multiple hash
functions is being added, written in Rust.

Any progress on CI breakages???

* bc/sha1-256-interop-02:
  object-file-convert: always make sure object ID algo is valid
  rust: add a small wrapper around the hashfile code
  rust: add a new binary object map format
  rust: add functionality to hash an object
  rust: add a build.rs script for tests
  hash: expose hash context functions to Rust
  write-or-die: add an fsync component for the object map
  csum-file: define hashwrite's count as a uint32_t
  rust: add additional helpers for ObjectID
  hash: add a function to look up hash algo structs
  rust: add a hash algorithm abstraction
  rust: add a ObjectID struct
  hash: use uint32_t for object_id algorithm
  conversion: don't crash when no destination algo
  repository: require Rust support for interoperability
2026-01-19 16:53:24 -08:00
Junio C Hamano
8044b60a4e ### CI 2026-01-19 16:53:23 -08:00
Junio C Hamano
bf78368d48 Merge branch 'js/neuter-sideband' into seen
Invalidate control characters in sideband messages, to avoid
terminal state getting messed up.

* js/neuter-sideband:
  sideband: offer to configure sanitizing on a per-URL basis
  sideband: add options to allow more control sequences to be passed through
  sideband: do allow ANSI color sequences by default
  sideband: introduce an "escape hatch" to allow control characters
  sideband: mask control characters
2026-01-19 16:53:23 -08:00
Junio C Hamano
d7a8968fc2 Merge branch 'ps/odb-for-each-object' into seen
Revamp object enumeration API around odb.

Comments?

* ps/odb-for-each-object:
  odb: drop unused `for_each_{loose,packed}_object()` functions
  reachable: convert to use `odb_for_each_object()`
  builtin/pack-objects: use `packfile_store_for_each_object()`
  odb: introduce mtime fields for object info requests
  treewide: drop uses of `for_each_{loose,packed}_object()`
  treewide: enumerate promisor objects via `odb_for_each_object()`
  builtin/fsck: refactor to use `odb_for_each_object()`
  odb: introduce `odb_for_each_object()`
  packfile: introduce function to iterate through objects
  packfile: extract function to iterate through objects of a store
  object-file: introduce function to iterate through objects
  object-file: extract function to read object info from path
  odb: fix flags parameter to be unsigned
  odb: rename `FOR_EACH_OBJECT_*` flags
2026-01-19 16:53:21 -08:00
Junio C Hamano
2523ae7cbf Merge branch 'ob/core-attributesfile-in-repository' into seen
The core.attributesfile is intended to be set per repository, but
were kept track of by a single global variable in-core, which has
been corrected by moving it to per-repository data structure.

Comments?

* ob/core-attributesfile-in-repository:
  environment: move "branch.autoSetupMerge" into `struct repo_config_values`
  environment: environment: stop using core.sparseCheckout globally
  environment: stop storing `core.attributesFile` globally
2026-01-19 16:53:19 -08:00
Junio C Hamano
84d1c3896f Merge branch 'cs/add-skip-submodule-ignore-all' into seen
"git add <submodule>" has been taught to honor
submodule.<name>.ignore that is set to "all" (and requires "git add
-f" to override it).

* cs/add-skip-submodule-ignore-all:
  Documentation: update add --force option + ignore=all config
  tests: fix existing tests when add an ignore=all submodule
  tests: t2206-add-submodule-ignored: ignore=all and add --force tests
  read-cache: submodule add need --force given ignore=all configuration
  read-cache: update add_files_to_cache take param ignored_too
2026-01-19 16:53:19 -08:00
Junio C Hamano
65619f970e Merge branch 'pw/replay-drop-empty' into seen
"git replay" is taught to drop commits that become empty (not the
ones that are empty in the original).

* pw/replay-drop-empty:
  replay: drop commits that become empty
2026-01-19 16:53:19 -08:00
Junio C Hamano
dde2d6d639 Merge branch 'ps/history' into seen
"git history" history rewriting UI.

* ps/history:
  builtin/history: implement "reword" subcommand
  builtin: add new "history" command
  wt-status: provide function to expose status for trees
  replay: support updating detached HEAD
  replay: support empty commit ranges
  replay: small set of cleanups
  builtin/replay: move core logic into "libgit.a"
  builtin/replay: extract core logic to replay revisions
2026-01-19 16:53:18 -08:00
Junio C Hamano
d75332b3c1 Merge branch 'cc/lop-filter-auto' into seen
"auto filter" logic for large-object promisor remote.

Comments?

* cc/lop-filter-auto:
  fetch-pack: wire up and enable auto filter logic
  promisor-remote: keep advertised filter in memory
  list-objects-filter-options: implement auto filter resolution
  list-objects-filter-options: support 'auto' mode for --filter
  doc: fetch: document `--filter=<filter-spec>` option
  fetch: make filter_options local to cmd_fetch()
  clone: make filter_options local to cmd_clone()
  promisor-remote: allow a client to store fields
  promisor-remote: refactor initialising field lists
2026-01-19 16:53:18 -08:00
Junio C Hamano
ee0eea2bcd Merge branch 'pt/t7527-flake-workaround' into seen
Test fixup.

Comments?

* pt/t7527-flake-workaround:
  t7527: fix flaky fsmonitor event tests with retry logic
2026-01-19 16:53:17 -08:00
Junio C Hamano
f983601403 Merge branch 'pt/fsmonitor-linux' into seen
The fsmonitor daemon has been implemented for Linux.

Comments?

* pt/fsmonitor-linux:
  fsmonitor: implement filesystem change listener for Linux
2026-01-19 16:53:17 -08:00
Junio C Hamano
d2a18ca1e3 Merge branch 'pc/lockfile-pid' into seen
Allow recording process ID of the process that holds the lock next
to a lockfile for diagnosis.

Comments?

* pc/lockfile-pid:
  lockfile: add PID file for debugging stale locks
2026-01-19 16:53:16 -08:00
Junio C Hamano
2f7967a105 Merge branch 'lo/repo-info-keys' into seen
"git repo info" learns "--keys" action to list known keys.

* lo/repo-info-keys:
  repo: add new flag --keys to git-repo-info
  repo: add a default output format to enum output_format
2026-01-19 16:53:16 -08:00
Lucas Seiki Oshiro
b1e13287d6 repo: add new flag --keys to git-repo-info
If the user wants to find what are the available keys, they need to
either check the documentation or to ask for all the key-value pairs
by using --all.

Add a new flag --keys for listing only the available keys without
listing the values.

Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-19 16:51:07 -08:00
Lucas Seiki Oshiro
6e61fe422e repo: add a default output format to enum output_format
Add "default" as an option for --format in both git-repo-info and
git-repo-structure. Using `--format=default` makes those commands use
their default output format.

Signed-off-by: Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-19 16:51:06 -08:00
Junio C Hamano
bbcd108f23 Merge branch 'tb/incremental-midx-part-3.2' into seen
Further work on incremental repacking using MIDX/bitmap

Comments?

* tb/incremental-midx-part-3.2:
  midx: enable reachability bitmaps during MIDX compaction
  midx: implement MIDX compaction
  t/helper/test-read-midx.c: plug memory leak when selecting layer
  midx-write.c: factor fanout layering from `compute_sorted_entries()`
  midx-write.c: enumerate `pack_int_id` values directly
  midx-write.c: extract `fill_pack_from_midx()`
  midx-write.c: introduce `midx_pack_perm()` helper
  git-compat-util.h: introduce `u32_add()`
  midx: do not require packs to be sorted in lexicographic order
  midx-write.c: introduce `struct write_midx_opts`
  midx-write.c: don't use `pack_perm` when assigning `bitmap_pos`
  t/t5319-multi-pack-index.sh: fix copy-and-paste error in t5319.39
  git-multi-pack-index(1): align SYNOPSIS with 'git multi-pack-index -h'
  git-multi-pack-index(1): remove non-existent incompatibility
  builtin/multi-pack-index.c: make '--progress' a common option
  midx: introduce `midx_get_checksum_hex()`
  midx: rename `get_midx_checksum()` to `midx_get_checksum_hash()`
  midx: mark `get_midx_checksum()` arguments as const
2026-01-19 16:44:50 -08:00
Junio C Hamano
8caa923418 Merge branch 'en/xdiff-cleanup-3' into seen
Preparation of xdiff/ codebase to work with Rust

Comments?

* en/xdiff-cleanup-3:
  SQUASH??? cocci
  xdiff: move xdl_cleanup_records() from xprepare.c to xdiffi.c
  xdiff: remove dependence on xdlclassifier from xdl_cleanup_records()
  xdiff: replace xdfile_t.dend with xdfenv_t.delta_end
  xdiff: replace xdfile_t.dstart with xdfenv_t.delta_start
  xdiff: cleanup xdl_trim_ends()
  xdiff: use xdfenv_t in xdl_trim_ends() and xdl_cleanup_records()
  xdiff: let patience and histogram benefit from xdl_trim_ends()
  xdiff: don't waste time guessing the number of lines
  xdiff: make classic diff explicit by creating xdl_do_classic_diff()
  ivec: introduce the C side of ivec
2026-01-19 16:44:50 -08:00
Junio C Hamano
3cd6a13187 Merge branch 'hn/status-compare-with-push' into jch
"git status" learned to show comparison between the current branch
and its push destination as well as its upstream, when the two are
different (i.e., triangular workflow).

* hn/status-compare-with-push:
  status: show comparison with push remote tracking branch
  refactor format_branch_comparison in preparation
2026-01-19 16:44:23 -08:00
Junio C Hamano
4cf14bb6b3 Merge branch 'jk/remote-tracking-ref-leakfix' into jch
Leakfix.

* jk/remote-tracking-ref-leakfix:
  remote: always allocate branch.push_tracking_ref
  remote: fix leak in branch_get_push_1() with invalid "simple" config
  remote: drop const return of tracking_for_push_dest()
  remote: return non-const pointer from error_buf()
2026-01-19 16:44:23 -08:00
Junio C Hamano
32592b6b1c Merge branch 'js/ci-leak-skip-svn' into jch
Dscho observed that SVN tests are taking too much time in CI leak
checking tasks, but most time is spent not in our code but in libsvn
code (which happen to be written in Perl), whose leaks have little
value to discover for us.  Skip SVN, P4, and CVS tests in the leak
checking tasks.

* js/ci-leak-skip-svn:
  ci: skip CVS and P4 tests in leaks job, too
  ci(*-leaks): skip the git-svn tests to save time
2026-01-19 16:44:23 -08:00
Junio C Hamano
45e71a66ef Merge branch 'jx/build-options-gettext' into jch
"git bugreport" and "git version --build-options" learned to
include use of 'gettext' feature, to make it easier to diagnose
problems around l10n.

* jx/build-options-gettext:
  help: report on whether or not gettext is enabled
2026-01-19 16:44:23 -08:00
Junio C Hamano
cbb6f20e70 Merge branch 'ty/t1005-test-path-is-helpers' into jch
Test clean-up.

* ty/t1005-test-path-is-helpers:
  t1005: modernize "! test -f" to "test_path_is_missing"
2026-01-19 16:44:22 -08:00
Junio C Hamano
fa6fbc85ca Merge branch 'lp/diff-stat-utf8-display-width-fix' into jch
The computation of column width made by "git diff --stat" was
confused when pathnames contain non-ASCII characters.

* lp/diff-stat-utf8-display-width-fix:
  t4073: add test for diffstat paths length when containing UTF-8 chars
  diff: improve scaling of filenames in diffstat to handle UTF-8 chars
2026-01-19 16:44:22 -08:00
Junio C Hamano
399857f593 Merge branch 'rj/cygwin-test-fixes-for-2.53' into jch
Test fixup.

* rj/cygwin-test-fixes-for-2.53:
  t0610-reftable-basics: mitigate a flaky test on cygwin
  t9700/test.pl: fix path type expectation on cygwin
2026-01-19 16:44:22 -08:00
Junio C Hamano
aef02c57dd Merge branch 'ar/run-command-hook-take-2' into jch
Use the hook API to replace ad-hoc invocation of hook scripts via
the run_command() API.

* ar/run-command-hook-take-2:
  hook: make ungroup opt-out instead of opt-in
  hook: allow hooks to disable stdout_to_stderr
  hook: check for NULL pointer before deref
  receive-pack: convert receive hooks to hook API
  receive-pack: convert update hooks to new API
  hooks: allow callers to capture output
  run-command: allow capturing of collated output
  hook: allow overriding the ungroup option
  reference-transaction: use hook API instead of run-command
  transport: convert pre-push to hook API
  hook: convert 'post-rewrite' hook in sequencer.c to hook API
  hook: provide stdin via callback
  run-command: add stdin callback for parallelization
  run-command: add first helper for pp child states
2026-01-19 16:44:22 -08:00
Junio C Hamano
acb41c2c6c Merge branch 'ps/commit-list-functions-renamed' into jch
Rename three functions around the commit_list data structure.

* ps/commit-list-functions-renamed:
  commit: rename `free_commit_list()` to conform to coding guidelines
  commit: rename `reverse_commit_list()` to conform to coding guidelines
  commit: rename `copy_commit_list()` to conform to coding guidelines
2026-01-19 16:44:21 -08:00
Junio C Hamano
d962663df9 Merge branch 'ps/validate-prefix-in-subtree-split' into jch
"git subtree split --prefix=P <commit>" now checks the prefix P
against the tree of the (potentially quite different from the
current working tree) given commit.

* ps/validate-prefix-in-subtree-split:
  subtree: validate --prefix against commit in split
2026-01-19 16:44:21 -08:00
Junio C Hamano
8b2df206f9 Merge branch 'ac/sparse-checkout-string-list-cleanup' into jch
Code clean-up.

* ac/sparse-checkout-string-list-cleanup:
  sparse-checkout: optimize string_list construction
2026-01-19 16:44:21 -08:00
Junio C Hamano
ba0033d781 Merge branch 'kn/ref-batch-output-error-reporting-fix' into jch
A handful of code paths that started using batched ref update API
(after Git 2.51 or so) lost detailed error output, which have been
corrected.

* kn/ref-batch-output-error-reporting-fix:
  fetch: delay user information post committing of transaction
  receive-pack: utilize rejected ref error details
  fetch: utilize rejected ref error details
  update-ref: utilize rejected error details if available
  refs: add rejection detail to the callback function
  refs: skip to next ref when current ref is rejected
  refs: drop unnecessary header includes
2026-01-19 16:44:21 -08:00
Junio C Hamano
444ed03813 Merge branch 'sp/myfirstcontribution-include-update' into jch
Doc update.

* sp/myfirstcontribution-include-update:
  doc: MyFirstContribution: fix missing dependencies and clarify build steps
2026-01-19 16:44:20 -08:00
Junio C Hamano
ee44f7cc83 Merge branch 'dd/t5403-modernise' into jch
Test clean-up.

* dd/t5403-modernise:
  t5403: use test_cmp for post-checkout argument checks
  t5403: introduce check_post_checkout helper function
2026-01-19 16:44:20 -08:00
Junio C Hamano
b16fecdb10 Merge branch 'sp/shallow-deepen-relative-fix' into jch
"git fetch --deepen" that tries to go beyond merged branch used to
get confused where the updated shallow points are, which has been
corrected.

Comments?

* sp/shallow-deepen-relative-fix:
  shallow: handling fetch relative-deepen
  shallow: free local object_array allocations
2026-01-19 16:44:19 -08:00
Junio C Hamano
bf3e2e1e77 Merge branch 'aa/add-p-previous-decisions' into jch
"git add -p" and friends notes what the current status of the hunk
being shown is.

* aa/add-p-previous-decisions:
  add -p: show user's hunk decision when selecting hunks
2026-01-19 16:44:19 -08:00
Junio C Hamano
fa1d03c4f0 Merge branch 'ag/http-netrc-tests' into jch
Additional tests were introduced to see the interaction with netrc
auth with auth failure on the http transport.

Comments?

* ag/http-netrc-tests:
  t5550: add netrc tests for http 401/403
2026-01-19 16:44:19 -08:00
Junio C Hamano
b85c3d4bbf Merge branch 'tt/receive-pack-oo-namespace-symref-fix' into jch
"git receive-pack", when namespace is involved, segfaulted when a
symbolic ref cross the namespace boundary.

Comments?

* tt/receive-pack-oo-namespace-symref-fix:
  receive-pack: fix crash on out-of-namespace symref
2026-01-19 16:44:19 -08:00
Junio C Hamano
085553af05 Merge branch 'sb/doc-worktree-prune-expire-improvement' into jch
The help text and the documentation for the "--expire" option of
"git worktree [list|prune]" have been improved.

* sb/doc-worktree-prune-expire-improvement:
  worktree: use 'prune' instead of 'expire' in help text
  worktree: clarify --expire applies to missing worktrees
2026-01-19 16:44:18 -08:00
Junio C Hamano
87695bb15e Merge branch 'ap/http-probe-rpc-use-auth' into jch
HTTP transport failed to authenticate in some code pahts, which has
been corrected.

* ap/http-probe-rpc-use-auth:
  remote-curl: use auth for probe_rpc() requests too
2026-01-19 16:44:18 -08:00
Junio C Hamano
9fcf2eb809 Merge branch 'sb/doc-update-ref-markup-fix' into jch
Doc mark-up fix.

* sb/doc-update-ref-markup-fix:
  doc: fix `update-ref` `symref-create` formatting
2026-01-19 16:44:18 -08:00
Junio C Hamano
901a53559f Merge branch 'ar/submodule-gitdir-tweak' into jch
Avoid local submodule repository directory paths overlapping with
each other by encoding submodule names before using them as path
components.

* ar/submodule-gitdir-tweak:
  submodule: detect conflicts with existing gitdir configs
  submodule: hash the submodule name for the gitdir path
  submodule: fix case-folding gitdir filesystem collisions
  submodule--helper: fix filesystem collisions by encoding gitdir paths
  builtin/credential-store: move is_rfc3986_unreserved to url.[ch]
  submodule--helper: add gitdir migration command
  submodule: allow runtime enabling extensions.submodulePathConfig
  submodule: introduce extensions.submodulePathConfig
  builtin/submodule--helper: add gitdir command
  submodule: always validate gitdirs inside submodule_name_to_gitdir
  submodule--helper: use submodule_name_to_gitdir in add_submodule
2026-01-19 16:44:17 -08:00
Junio C Hamano
52ad3a3658 Merge branch 'tc/last-modified-not-a-tree' into jch
Giving "git last-modified" a tree (not a commit-ish) died an
uncontrolled death, which has been corrected.

* tc/last-modified-not-a-tree:
  last-modified: verify revision argument is a commit-ish
  last-modified: remove double error message
  last-modified: fix memory leak when more than one revision is given
  last-modified: rewrite error message when more than one revision given
2026-01-19 16:44:17 -08:00
Junio C Hamano
30bce90cfc Merge branch 'js/symlink-windows' into jch
Upstream symbolic link support on Windows from Git-for-Windows.

* js/symlink-windows:
  mingw: special-case index entries for symlinks with buggy size
  mingw: emulate `stat()` a little more faithfully
  mingw: try to create symlinks without elevated permissions
  mingw: add support for symlinks to directories
  mingw: implement basic `symlink()` functionality (file symlinks only)
  mingw: implement `readlink()`
  mingw: allow `mingw_chdir()` to change to symlink-resolved directories
  mingw: support renaming symlinks
  mingw: handle symlinks to directories in `mingw_unlink()`
  mingw: add symlink-specific error codes
  mingw: change default of `core.symlinks` to false
  mingw: factor out the retry logic
  mingw: compute the correct size for symlinks in `mingw_lstat()`
  mingw: teach dirent about symlinks
  mingw: let `mingw_lstat()` error early upon problems with reparse points
  mingw: drop the separate `do_lstat()` function
  mingw: implement `stat()` with symlink support
  mingw: don't call `GetFileAttributes()` twice in `mingw_lstat()`
2026-01-19 16:44:17 -08:00