79590 Commits

Author SHA1 Message Date
Junio C Hamano
b5bc1d26dc 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-08 16:41:17 +09:00
Junio C Hamano
bf186000c4 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-08 16:41:17 +09:00
Junio C Hamano
4f640bc27d Merge branch 'js/neuter-sideband' into seen
Invalidate control characters in sideband messages, to avoid
terminal state getting messed up.

Comments?
cf. <aS-D5lD2Kk6BHNIl@fruit.crustytoothpaste.net>

* js/neuter-sideband:
  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-08 16:41:17 +09:00
Junio C Hamano
58c22cd2b3 Merge branch 'lo/repo-info-keys' into seen
"git repo info" learns "--keys" action to list known keys.

Comments?

* 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-08 16:41:16 +09:00
Junio C Hamano
095f1116ca 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.

Comments?

* sp/shallow-time-boundary:
  shallow: set borders which are all reachable after clone shallow since
2026-01-08 16:41:15 +09:00
Junio C Hamano
44bcf24cad Merge branch 'dw/config-global-list' into seen
"git config --list --global", unlike "git config --list", did not
consult both of the two possible per-user sources of the
configuration files, i.e. $HOME/.gitconfig and the XDG one, which
has been corrected.

* dw/config-global-list:
  config: keep bailing on unreadable global files
  config: read global scope via config_sequence
  config: test home and xdg files in `list --global`
  cleanup_path: force forward slashes on Windows
2026-01-08 16:41:15 +09:00
Junio C Hamano
13cbf41d9a Merge branch 'lc/rebase-trailer' into seen
Refactor code paths to run "interpret-trailers" from "git
commit/tag" and use it in "git rebase".

* lc/rebase-trailer:
  rebase: support --trailer
  trailer: append trailers in-process and drop the fork to `interpret-trailers`
  trailer: move process_trailers to trailer.h
  interpret-trailers: factor out buffer-based processing to process_trailers()
2026-01-08 16:41:15 +09:00
Junio C Hamano
5707418fd8 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-08 16:41:15 +09:00
Junio C Hamano
82911d0018 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.

Comments?

* jc/exclude-with-gitignore:
  dir.c: do not be fooled by :(exclude) pathspec elements
2026-01-08 16:41:14 +09:00
Junio C Hamano
efa55cf293 Merge branch 'tb/incremental-midx-part-3.2' into seen
Further work on incremental repacking using MIDX/bitmap

* 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: split `get_midx_checksum()` by adding `get_midx_hash()`
  midx: mark `get_midx_checksum()` arguments as const
2026-01-08 16:41:14 +09:00
Junio C Hamano
54f9c883d3 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-08 16:41:13 +09:00
Junio C Hamano
dec7f872bb 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 "core.attributesFile" into repo-setting
2026-01-08 16:41:13 +09:00
Junio C Hamano
add7467614 Merge branch 'ml/doc-blame-markup' into seen
Doc mark-up update.

* ml/doc-blame-markup:
  doc: git-blame: convert blame to new doc format
2026-01-08 16:41:13 +09:00
Junio C Hamano
54e5db7570 Merge branch 'je/doc-reset' into seen
Documentation updates.

* je/doc-reset:
  doc: git-reset: clarify `git reset <pathspec>`
  doc: git-reset: clarify `git reset [mode]`
  doc: git-reset: clarify intro
  doc: git-reset: reorder the forms
2026-01-08 16:41:13 +09:00
Junio C Hamano
182979e152 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-08 16:40:38 +09:00
Junio C Hamano
f969c26ae4 Merge branch 'ac/t1420-use-more-direct-check' into jch
Test update.

* ac/t1420-use-more-direct-check:
  t1420: modernize the lost-found test
2026-01-08 16:40:38 +09:00
Junio C Hamano
b17d88edb1 Merge branch 'jk/cat-file-avoid-bitmap-when-unneeded' into jch
Fix for a performance regression in "git cat-file".

* jk/cat-file-avoid-bitmap-when-unneeded:
  cat-file: only use bitmaps when filtering
2026-01-08 16:40:38 +09:00
Junio C Hamano
8bbdec8258 Merge branch 'jk/t-perf-fixes' into jch
Perf-test fixes.

* jk/t-perf-fixes:
  t/perf/run: preserve GIT_PERF_* from environment
  t/perf/perf-lib: fix assignment of TEST_OUTPUT_DIRECTORY
2026-01-08 16:40:37 +09:00
Junio C Hamano
b43a84d22e Merge branch 'ps/read-object-info-improvements' into jch
The object-info API has been cleaned up.

Comments?

* ps/read-object-info-improvements:
  packfile: drop repository parameter from `packed_object_info()`
  packfile: skip unpacking object header for disk size requests
  packfile: disentangle return value of `packed_object_info()`
  packfile: always populate pack-specific info when reading object info
  packfile: extend `is_delta` field to allow for "unknown" state
  packfile: always declare object info to be OI_PACKED
  object-file: always set OI_LOOSE when reading object info
2026-01-08 16:40:37 +09:00
Junio C Hamano
53b44d9bcf Merge branch 'en/fsck-snapshot-ref-state' into jch
"git fsck" used inconsistent set of refs to show a confused
warning, which has been corrected.

* en/fsck-snapshot-ref-state:
  fsck: snapshot default refs before object walk
2026-01-08 16:40:37 +09:00
Junio C Hamano
17a70947dd 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-08 16:40:37 +09:00
Junio C Hamano
44961b090e 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-08 16:40:36 +09:00
Junio C Hamano
ae4ce794e1 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-08 16:40:36 +09:00
Junio C Hamano
9c835711cd Merge branch 'js/prep-symlink-windows' into jch
Further preparation to upstream symbolic link support on Windows.

* js/prep-symlink-windows:
  trim_last_path_component(): avoid hard-coding the directory separator
  strbuf_readlink(): support link targets that exceed PATH_MAX
  strbuf_readlink(): avoid calling `readlink()` twice in corner-cases
  init: do parse _all_ core.* settings early
  mingw: do resolve symlinks in `getcwd()`
2026-01-08 16:40:36 +09:00
Junio C Hamano
571c2317fc Merge branch 'ap/http-probe-rpc-use-auth' into jch
* ap/http-probe-rpc-use-auth:
  remote-curl: Use auth for probe_rpc() requests too
2026-01-08 16:40:36 +09:00
Junio C Hamano
7bfa6bbf46 Merge branch 'sb/doc-update-ref-markup-fix' into jch
Doc mark-up fix.

Will merget to 'next'.

* sb/doc-update-ref-markup-fix:
  doc: fix `update-ref` `symref-create` formatting
2026-01-08 16:40:35 +09:00
Junio C Hamano
14e9ef1b89 Merge branch 'yc/histogram-hunk-shift-fix' into jch
The final clean-up phase of the diff output could turn the result of
histogram diff algorithm suboptimal, which has been corrected.

Comments?

* yc/histogram-hunk-shift-fix:
  xdiff: re-diff shifted change groups when using histogram algorithm
2026-01-08 16:40:35 +09:00
Junio C Hamano
db3876ce47 Merge branch 'jk/parse-int' into jch
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-08 16:40:35 +09:00
Junio C Hamano
31274bdd17 Merge branch 'tc/last-modified-options-cleanup' into jch
The "-z" and "--max-depth" documentation (and implementation of
"-z") in the "git last-modified" command have been updated.

* tc/last-modified-options-cleanup:
  fixup! last-modified: document option --max-depth
  last-modified: document how depth is handled better
  last-modified: document option --max-depth
  last-modified: handle and document NUL termination
2026-01-08 16:40:34 +09:00
Junio C Hamano
61f3f7b770 Merge branch 'kn/ref-location' into jch
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.

Comments?

* kn/ref-location:
  refs: add GIT_REF_URI to specify reference backend and directory
  refs: support obtaining ref_store for given dir
2026-01-08 16:40:34 +09:00
Junio C Hamano
45d4b513c3 Merge branch 'wm/complete-git-short-opts' into jch
The command line completion script (in contrib/) learned to
complete "git -<TAB>" to give single-letter options like "-C".

* wm/complete-git-short-opts:
  completion: complete "git -<TAB>" with short options
2026-01-08 16:40:34 +09:00
Junio C Hamano
446369869b 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.

Comments?

* 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-08 16:40:33 +09:00
Junio C Hamano
11e5dec2ba Merge branch 'ps/packfile-store-in-odb-source' into jch
The packfile_store data structure is moved from object store to odb
source.

* ps/packfile-store-in-odb-source:
  packfile: move MIDX into packfile store
  packfile: refactor `find_pack_entry()` to work on the packfile store
  packfile: inline `find_kept_pack_entry()`
  packfile: only prepare owning store in `packfile_store_prepare()`
  packfile: only prepare owning store in `packfile_store_get_packs()`
  packfile: move packfile store into object source
  packfile: refactor misleading code when unusing pack windows
  packfile: refactor kept-pack cache to work with packfile stores
  packfile: pass source to `prepare_pack()`
  packfile: create store via its owning source
2026-01-08 16:40:33 +09:00
Junio C Hamano
e26fe3f7d2 ### match next 2026-01-08 16:40:32 +09:00
Junio C Hamano
6d0ac2147d Merge branch 'ps/clar-integers' into jch
Import newer version of "clar", unit testing framework.

* ps/clar-integers:
  gitattributes: disable blank-at-eof errors for clar test expectations
  t/unit-tests: demonstrate use of integer comparison assertions
  t/unit-tests: update clar to 39f11fe
2026-01-08 16:40:32 +09:00
Junio C Hamano
6856aa4803 Merge branch 'kh/replay-invalid-onto-advance' into jch
Test coverage of "git replay" has been improved.

* kh/replay-invalid-onto-advance:
  t3650: add more regression tests for failure conditions
  replay: die if we cannot parse object
  replay: improve code comment and die message
  replay: die descriptively when invalid commit-ish is given
  replay: find *onto only after testing for ref name
  replay: remove dead code and rearrange
2026-01-08 16:40:32 +09:00
Junio C Hamano
3d198e2b10 Merge branch 'ps/odb-misc-fixes' into jch
Miscellaneous fixes on object database layer.

* ps/odb-misc-fixes:
  odb: properly close sources before freeing them
  builtin/gc: fix condition for whether to write commit graphs
2026-01-08 16:40:31 +09:00
Junio C Hamano
f9c04f1e97 Merge branch 'pt/t7800-difftool-test-racefix' into jch
Test fixup.

* pt/t7800-difftool-test-racefix:
  t7800: fix racy "difftool --dir-diff syncs worktree" test
2026-01-08 16:40:31 +09:00
Junio C Hamano
fb9120bfa7 Merge branch 'ps/t1300-2021-use-test-path-is-helpers' into jch
Test updates.

* ps/t1300-2021-use-test-path-is-helpers:
  t1300: use test helpers instead of `test` command
2026-01-08 16:40:31 +09:00
Junio C Hamano
6d7996535d Merge branch 'rs/commit-stack' into jch
Code clean-up, unifying various hand-rolled "list of commit
objects" and use the commit_stack API.

* rs/commit-stack:
  commit-reach: use commit_stack
  commit-graph: use commit_stack
  commit: add commit_stack_grow()
  shallow: use commit_stack
  pack-bitmap-write: use commit_stack
  commit: add commit_stack_init()
  test-reach: use commit_stack
  remote: use commit_stack for src_commits
  remote: use commit_stack for sent_tips
  remote: use commit_stack for local_commits
  name-rev: use commit_stack
  midx: use commit_stack
  log: use commit_stack
  revision: export commit_stack
2026-01-08 16:40:31 +09:00
Junio C Hamano
96ba419a76 Merge branch 'sb/bundle-uri-without-uri' into jch
Diagnose invalid bundle-URI that lack the URI entry, instead of
crashing.

* sb/bundle-uri-without-uri:
  bundle-uri: validate that bundle entries have a uri
2026-01-08 16:40:31 +09:00
Junio C Hamano
e2124d6fe0 Merge branch 'ja/doc-synopsis-style-more' into jch
More doc style updates.

* ja/doc-synopsis-style-more:
  doc: convert git-remote to synopsis style
  doc: convert git stage to use synopsis block
  doc: convert git-status tables to AsciiDoc format
  doc: convert git-status to synopsis style
  doc: fix t0450-txt-doc-vs-help to select only first synopsis block
2026-01-08 16:40:30 +09:00
Junio C Hamano
d529f3a197 The 16th batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-08 16:40:12 +09:00
Junio C Hamano
2db806d817 Merge branch 'en/ort-recursive-d-f-conflict-fix'
The ort merge machinery hit an assertion failure in a history with
criss-cross merges renamed a directory and a non-directory, which
has been corrected.

* en/ort-recursive-d-f-conflict-fix:
  merge-ort: fix corner case recursive submodule/directory conflict handling
2026-01-08 16:40:12 +09:00
Junio C Hamano
512351f2a8 Merge branch 'dd/t5403-modernise'
Test micro-clean-up.

* dd/t5403-modernise:
  t5403: use test_path_is_file instead of test -f
2026-01-08 16:40:12 +09:00
Junio C Hamano
c0754dc423 Merge branch 'ds/diff-lazy-fetch-with-name-only-fix'
Running "git diff" with "--name-only" and other options that allows
us not to look at the blob contents, while objects that are lazily
fetched from a promisor remote, caused use-after-free, which has
been corrected.

* ds/diff-lazy-fetch-with-name-only-fix:
  diff: avoid segfault with freed entries
2026-01-08 16:40:11 +09:00
Junio C Hamano
d28d2be5f2 Merge branch 'rs/tag-wo-the-repository'
Code clean-up.

* rs/tag-wo-the-repository:
  tag: stop using the_repository
  tag: support arbitrary repositories in parse_tag()
  tag: support arbitrary repositories in gpg_verify_tag()
  tag: use algo of repo parameter in parse_tag_buffer()
2026-01-08 16:40:11 +09:00
Adrian Ratiu
36d43bef82 submodule: detect conflicts with existing gitdir configs
Credit goes to Emily and Josh for testing and noticing a corner-case
which caused conflicts with existing gitdir configs to silently pass
validation, then fail later in add_submodule() with a cryptic error:

fatal: A git directory for 'nested%2fsub' is found locally with remote(s):
  origin	/.../trash directory.t7425-submodule-gitdir-path-extension/sub

This change ensures the validation step checks existing gitdirs for
conflicts. We only have to do this for submodules having gitdirs,
because those without submodule.%s.gitdir need to be migrated and
will throw an error earlier in the submodule codepath.

Quoting Josh:
 My testing setup has been as follows:
 * Using our locally-built Git with our downstream patch of [1] included:
   * create a repo "sub"
   * create a repo "super"
   * In "super":
     * mkdir nested
     * git submodule add ../sub nested/sub
     * Verify that the submodule's gitdir is .git/modules/nested%2fsub
 * Using a build of git from upstream `next` plus this series:
   * git config set --global extensions.submodulepathconfig true
   * git clone --recurse-submodules super super2
   * create a repo "nested%2fsub"
   * In "super2":
     * git submodule add ../nested%2fsub

At this point I'd expect the collision detection / encoding to take
effect, but instead I get the error listed above.
End quote

Suggested-by: Josh Steadmon <steadmon@google.com>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-08 11:05:16 +09:00
Adrian Ratiu
a612f856ff submodule: hash the submodule name for the gitdir path
If none of the previous plain-text / encoding / derivation steps work
and case 2.4 is reached, then try a hash of the submodule name to see
if that can be a valid gitdir before giving up and throwing an error.

This is a "last resort" type of measure to avoid conflicts since it
loses the human readability of the gitdir path. This logic will be
reached in rare cases, as can be seen in the test we added.

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-08 11:05:16 +09:00
Adrian Ratiu
1bb1906270 submodule: fix case-folding gitdir filesystem collisions
Add a new check when extension.submodulePathConfig is enabled, to
detect and prevent case-folding filesystem colisions. When this
new check is triggered, a stricter casefolding aware URI encoding
is used to percent-encode uppercase characters.

By using this check/retry mechanism the uppercase encoding is
only applied when necessary, so case-sensitive filesystems are
not affected.

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-01-08 11:05:16 +09:00