79432 Commits

Author SHA1 Message Date
Junio C Hamano
5d6acbe428 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.

* 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
2025-12-12 22:11:55 +09:00
Junio C Hamano
da9e5cb7d8 ### CI 2025-12-12 22:11:54 +09:00
Junio C Hamano
479da5de76 Merge branch 'jt/repo-struct-more-objinfo' into seen
More object database related information are shown in "git repo
structure" output.

Comments?

* jt/repo-struct-more-objinfo:
  builtin/repo: add object disk size info to structure table
  builtin/repo: add disk size info to keyvalue stucture output
  builtin/repo: add inflated object info to structure table
  builtin/repo: add inflated object info to keyvalue structure output
  builtin/repo: humanise count values in structure output
  builtin/repo: group per-type object values into struct
2025-12-12 22:11:54 +09:00
Junio C Hamano
ac361ce73a 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
2025-12-12 22:11:54 +09:00
Junio C Hamano
ea4699cb88 Merge branch 'ap/packfile-promisor-object-optim' into seen
The code path that enumerates promisor objects have been optimized
to skip pointlessly parsing blob objects.

Comments?

* ap/packfile-promisor-object-optim:
  packfile: skip hash checks in add_promisor_object()
  object: apply skip_hash and discard_tree optimizations to unknown blobs too
2025-12-12 22:11:54 +09:00
Junio C Hamano
69f9717a59 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
2025-12-12 22:11:53 +09:00
Junio C Hamano
d197eb1d22 Merge branch 'js/test-symlink-windows' into seen
Prepare test suite for Git for Windows that supports symbolic
links.

Comments?
cf. <xmqqms44cb7p.fsf@gitster.g>
cf. <xmqqecpgc8wd.fsf@gitster.g>

* js/test-symlink-windows:
  t7800: work around the MSYS path conversion on Windows
  t6423: introduce Windows-specific handling for symlinking to /dev/null
  t1305: skip symlink tests that do not apply to Windows
  t1006: accommodate for symlink support in MSYS2
  t0600: fix incomplete prerequisite for a test case
  t0301: another fix for Windows compatibility
  t0001: handle `diff --no-index` gracefully
  mingw: special-case `open(symlink, O_CREAT | O_EXCL)`
  apply: symbolic links lack a "trustable executable bit"
  t9700: accommodate for Windows paths
2025-12-12 22:11:53 +09:00
Junio C Hamano
191d10ae43 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
2025-12-12 22:11:53 +09:00
Junio C Hamano
ad3216427c 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
2025-12-12 22:11:53 +09:00
Junio C Hamano
4f7db4b734 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
2025-12-12 22:11:52 +09:00
Junio C Hamano
1fda8f779d 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()
2025-12-12 22:11:52 +09:00
Junio C Hamano
5c713fa000 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
2025-12-12 22:11:52 +09:00
Junio C Hamano
0800d62d1d 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
2025-12-12 22:11:51 +09:00
Junio C Hamano
7ce315ce25 Merge branch 'ps/history' into seen
"git history" history rewriting UI.

Ready?

* ps/history:
  builtin/history: implement "split" subcommand
  cache-tree: allow writing in-memory index as tree
  add-patch: allow disabling editing of hunks
  add-patch: add support for in-memory index patching
  add-patch: remove dependency on "add-interactive" subsystem
  add-patch: split out `struct interactive_options`
  add-patch: split out header from "add-interactive.h"
  builtin/history: implement "reword" subcommand
  builtin: add new "history" command
  replay: stop using `the_repository`
  replay: extract logic to pick commits
  wt-status: provide function to expose status for trees
2025-12-12 22:11:51 +09:00
Junio C Hamano
6f23a2b952 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
2025-12-12 22:11:50 +09:00
Junio C Hamano
5e53cfc360 Merge branch 'ps/clar-integers' into seen
Import newer version of "clar", unit testing framework.

Comments?

* 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
2025-12-12 22:11:50 +09:00
Junio C Hamano
ead5eaf5b3 Merge branch 'kj/pull-options-decl-cleanup' into jch
* kj/pull-options-decl-cleanup:
  pull: move options[] array into function scope
2025-12-12 22:11:33 +09:00
Junio C Hamano
d1bc2ecd33 Merge branch 'rs/macos-iconv-workaround' into jch
Workaround that "iconv" shipped as part of macOS, which is broken
handling ISO-2022 encoded strings.

* rs/macos-iconv-workaround:
  config.mak.uname: use iconv from Homebrew on macOS
2025-12-12 22:11:26 +09:00
Junio C Hamano
61e86607c3 Merge branch 'tc/memzero-array' into jch
MEMZERO_ARRAY() helper is introduced to avoid clearing only the
first N bytes of an N-element array whose elements are larger than
a byte.

* tc/memzero-array:
  contrib/coccinelle: pass include paths to spatch(1)
  git-compat-util: introduce MEMZERO_ARRAY() macro
2025-12-12 22:11:26 +09:00
Junio C Hamano
06df6a6636 Merge branch 'jc/c99-fam' into jch
Require C99 style flexible array member support after Git 3.0
boundary.

Comments?

* jc/c99-fam:
  FLEX_ARRAY: require platforms to support the C99 syntax
2025-12-12 22:11:26 +09:00
K Jayatheerth
bab391761d pull: move options[] array into function scope
Unless there are good reasons, it is customary to have the options[]
array used with the parse-options API declared in function scope rather
than at file scope.

Move builtin/pull.c:cmd_pull()’s options[] array into the function to
match that convention.

Signed-off-by: K Jayatheerth <jayatheerthkulkarni2005@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-12-12 22:08:02 +09:00
Junio C Hamano
4d75f2aea7 FLEX_ARRAY: require platforms to support the C99 syntax
Before C99 syntax to express that the final member in a struct is an
array of unknown number of elements, i.e.,

	struct {
		...
		T flexible_array[];
	};

came along, GNU introduced their own extension to declare such a
member with 0 size, i.e.,

		T flexible_array[0];

and the compilers that did not understand even that were given a way
to emulate it by wasting one element, i.e.,

		T flexible_array[1];

As we are using more and more C99 language features, let's see if
the platforms that still need to resort to the historical forms of
flexible array member support are still there, by forcing all the
flex array definitions to use the C99 syntax and see if anybody
screams (in which case reverting the changes is rather easy).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-12-12 22:05:19 +09:00
Junio C Hamano
7104978e75 Merge branch 'jc/macports-darwinports' into jch
Makefile in-comment doc update.

* jc/macports-darwinports:
  Makefile: help macOS novices by mentioning MacPorts
2025-12-12 15:53:10 +09:00
Junio C Hamano
5731dffd0a Merge branch 'rs/replay-wrong-onto-fix' into jch
"git replay --onto=<commit> ...", when <commit> is mistyped,
started to segfault with recent change, which has been corrected.

* rs/replay-wrong-onto-fix:
  replay: move onto NULL check before first use
2025-12-12 15:53:10 +09:00
Junio C Hamano
94802ae714 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
2025-12-12 15:53:10 +09:00
Junio C Hamano
2f8df0d358 Merge branch 'ps/repack-avoid-noop-midx-rewrite' into jch
Even when there is no changes in the packfile and no need to
recompute bitmaps, "git repack" recomputed and updated the MIDX
file, which has been corrected.

Comments?

* ps/repack-avoid-noop-midx-rewrite:
  midx-write: skip rewriting MIDX with `--stdin-packs` unless needed
  midx-write: extract function to test whether MIDX needs updating
  midx: fix `BUG()` when getting preferred pack without a reverse index
2025-12-12 15:53:09 +09:00
Junio C Hamano
0bd962a220 Merge branch 'jc/completion-no-single-letter-options' into jch
In-code comment update to clarify that single-letter options are
outside of the scope of command line completion script.

Comments?

* jc/completion-no-single-letter-options:
  completion: clarify support for short options and arguments
2025-12-12 15:53:09 +09:00
Junio C Hamano
05158b445b 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
2025-12-12 15:53:08 +09:00
Junio C Hamano
ac7cb2d970 Merge branch 'ps/odb-misc-fixes' into jch
Miscellaneous fixes on object database layer.

Comments?

* ps/odb-misc-fixes:
  odb: properly close sources before freeing them
  builtin/gc: fix condition for whether to write commit graphs
2025-12-12 15:53:08 +09:00
Junio C Hamano
cfccd13d86 Merge branch 'ds/doc-scalar-config' into jch
Documentation updates.

* ds/doc-scalar-config:
  scalar: document config settings
  scalar: alphabetize and simplify config
  scalar: remove stale config values
  scalar: use index.skipHash=true for performance
  scalar: annotate config file with "set by scalar"
2025-12-12 15:53:08 +09:00
Junio C Hamano
d8593af887 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
2025-12-12 15:53:08 +09:00
Junio C Hamano
265888763b 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
2025-12-12 15:53:07 +09:00
Junio C Hamano
d33584efb4 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
2025-12-12 15:53:07 +09:00
Junio C Hamano
09e336e438 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
2025-12-12 15:53:07 +09:00
Junio C Hamano
a21836a42a Merge branch 'jc/submodule-add' into jch
"git submodule add" to add a submodule under <name> segfaulted,
when a submodule.<name>.something is already in .gitmodules file
without defining where its submodule.<name>.path is, which has been
corrected.

Comments?

* jc/submodule-add:
  submodule add: sanity check existing .gitmodules
2025-12-12 15:53:06 +09:00
Junio C Hamano
5b838e9a7d Merge branch 'ar/run-command-hook' into jch
Use hook API to replace ad-hoc invocation of hook scripts with the
run_command() API.

* ar/run-command-hook:
  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
2025-12-12 15:53:06 +09:00
Junio C Hamano
6991d74849 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:
  meson/Makefile: allow setting submodule encoding at build time
  submodule: use hashed name for gitdir
  submodule: fix case-folding gitdir filesystem colisions
  submodule: add extension to encode gitdir paths
  submodule: always validate gitdirs inside submodule_name_to_gitdir
  builtin/credential-store: move is_rfc3986_unreserved to url.[ch]
  submodule--helper: use submodule_name_to_gitdir in add_submodule
2025-12-12 15:53:06 +09:00
Junio C Hamano
b9efa87f0a Merge branch 'kn/fix-fetch-backfill-tag-with-batched-ref-updates' into jch
"git fetch" that involves fetching tags, when a tag being fetched
needs to overwrite existing one, failed to fetch other tags, which
has been corrected.

* kn/fix-fetch-backfill-tag-with-batched-ref-updates:
  fetch: fix failed batched updates skipping operations
  fetch: fix non-conflicting tags not being committed
  fetch: extract out reference committing logic
2025-12-12 15:53:06 +09:00
Junio C Hamano
186ffffe99 Merge branch 'kh/doc-replay-updates' into jch
"git replay" documentation updates.

* kh/doc-replay-updates:
  doc: replay: link section using markup
  doc: replay: document --contained
  doc: replay: mention no output on conflicts
2025-12-12 15:53:05 +09:00
Junio C Hamano
4c39c514b7 ### match next 2025-12-12 15:53:05 +09:00
Junio C Hamano
e22211fc75 Merge branch 'ps/odb-alternates-object-sources' into jch
Code refactoring around alternate object store.

* ps/odb-alternates-object-sources:
  odb: write alternates via sources
  odb: read alternates via sources
  odb: drop forward declaration of `read_info_alternates()`
  odb: remove mutual recursion when parsing alternates
  odb: stop splitting alternate in `odb_add_to_alternates_file()`
  odb: move computation of normalized objdir into `alt_odb_usable()`
  odb: resolve relative alternative paths when parsing
  odb: refactor parsing of alternates to be self-contained
2025-12-12 15:53:05 +09:00
Junio C Hamano
d447ddd7d9 Merge branch 'kh/doc-send-email-paragraph-fix' into jch
Docfix.

* kh/doc-send-email-paragraph-fix:
  doc: send-email: fix broken list continuation
2025-12-12 15:53:05 +09:00
Junio C Hamano
f5e38846fc Merge branch 'mh/doc-config-gui-gcwarning' into jch
Docfix.

* mh/doc-config-gui-gcwarning:
  config: document 'gui.GCWarning'
2025-12-12 15:53:05 +09:00
Junio C Hamano
8b8f10570a Merge branch 'kh/doc-pre-commit-fix' into jch
Docfix.

* kh/doc-pre-commit-fix:
  doc: join default pre-commit paragraphs
2025-12-12 15:53:04 +09:00
Junio C Hamano
8bc0e80f10 Merge branch 'jc/capability-leak' into jch
Leakfix.

* jc/capability-leak:
  connect: plug protocol capability leak
2025-12-12 15:53:04 +09:00
Junio C Hamano
8545bcc73b Merge branch 'rs/ban-mktemp' into jch
Rewrite the only use of "mktemp()" that is subject to TOCTOU race
and Stop using the insecure "mktemp()" function.

* rs/ban-mktemp:
  compat: remove gitmkdtemp()
  banned.h: ban mktemp(3)
  compat: remove mingw_mktemp()
  compat: use git_mkdtemp()
  wrapper: add git_mkdtemp()
2025-12-12 15:53:04 +09:00
Junio C Hamano
6673578261 Merge branch 'gf/win32-pthread-cond-init' into jch
Emulation code clean-up.

* gf/win32-pthread-cond-init:
  win32: pthread_cond_init should return a value
2025-12-12 15:53:04 +09:00
Junio C Hamano
b7e453ea59 Merge branch 'ps/object-read-stream' into jch
The "git_istream" abstraction has been revamped to make it easier
to interface with pluggable object database design.

* ps/object-read-stream:
  streaming: drop redundant type and size pointers
  streaming: move into object database subsystem
  streaming: refactor interface to be object-database-centric
  streaming: move logic to read packed objects streams into backend
  streaming: move logic to read loose objects streams into backend
  streaming: make the `odb_read_stream` definition public
  streaming: get rid of `the_repository`
  streaming: rely on object sources to create object stream
  packfile: introduce function to read object info from a store
  streaming: move zlib stream into backends
  streaming: create structure for filtered object streams
  streaming: create structure for packed object streams
  streaming: create structure for loose object streams
  streaming: create structure for in-core object streams
  streaming: allocate stream inside the backend-specific logic
  streaming: explicitly pass packfile info when streaming a packed object
  streaming: propagate final object type via the stream
  streaming: drop the `open()` callback function
  streaming: rename `git_istream` into `odb_read_stream`
2025-12-12 15:53:03 +09:00
Junio C Hamano
1da378b1c3 Merge branch 'je/doc-data-model' into jch
Docfix.

* je/doc-data-model:
  doc: remove stray text in Git data model
2025-12-12 15:53:03 +09:00
Junio C Hamano
99fdb3635b Merge branch 'lo/repo-struct-z' into jch
"git repo struct" learned to take "-z" as a synonym to "--format=nul".

* lo/repo-struct-z:
  repo: add -z as an alias for --format=nul to git-repo-structure
  repo: use [--format=... | -z] instead of [-z] in git-repo-info synopsis
  repo: remove blank line from Documentation/git-repo.adoc
2025-12-12 15:53:03 +09:00