Commit Graph

80069 Commits

Author SHA1 Message Date
Junio C Hamano
bf4b888b02 Merge branch 'kh/format-patch-noprefix-is-boolean' into jch
The configuration variable format.noprefix did not behave as a
proper boolean variable, which has now been fixed and documented.

* kh/format-patch-noprefix-is-boolean:
  doc: diff-options.adoc: make *.noprefix split translatable
  doc: diff-options.adoc: show format.noprefix for format-patch
  format-patch: make format.noprefix a boolean
2026-03-03 11:08:26 -08:00
Junio C Hamano
0fe6332778 Merge branch 'jk/repo-structure-cleanup' into jch
Code clean-up.

* jk/repo-structure-cleanup:
  repo: remove unnecessary variable shadow
2026-03-03 11:08:26 -08:00
Junio C Hamano
b246a35434 Merge branch 'lp/diff-stat-utf8-display-width-fix' into jch
"git log --graph --stat" did not count the display width of colored
graph part of its own output correctly, which has been corrected.

* lp/diff-stat-utf8-display-width-fix:
  t4052: test for diffstat width when prefix contains ANSI escape codes
  diff: handle ANSI escape codes in prefix when calculating diffstat width
2026-03-03 11:08:26 -08:00
Junio C Hamano
199509e75e Merge branch 'jh/alias-i18n-fixes' (early part) into jch
* 'jh/alias-i18n-fixes' (early part):
  git, help: fix memory leaks in alias listing
  alias: treat empty subsection [alias ""] as plain [alias]
  doc: fix list continuation in alias subsection example
2026-03-03 11:08:25 -08:00
Junio C Hamano
a4250cda41 Merge branch 'cs/add-skip-submodule-ignore-all' into jch
"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-03-03 11:08:25 -08:00
Junio C Hamano
02125d59ac Merge branch 'ps/refs-for-each' into jch
Code refactoring around refs-for-each-* API functions.

* ps/refs-for-each:
  refs: replace `refs_for_each_fullref_in()`
  refs: replace `refs_for_each_namespaced_ref()`
  refs: replace `refs_for_each_glob_ref()`
  refs: replace `refs_for_each_glob_ref_in()`
  refs: replace `refs_for_each_rawref_in()`
  refs: replace `refs_for_each_rawref()`
  refs: replace `refs_for_each_ref_in()`
  refs: improve verification for-each-ref options
  refs: generalize `refs_for_each_fullref_in_prefixes()`
  refs: generalize `refs_for_each_namespaced_ref()`
  refs: speed up `refs_for_each_glob_ref_in()`
  refs: introduce `refs_for_each_ref_ext`
  refs: rename `each_ref_fn`
  refs: rename `do_for_each_ref_flags`
  refs: move `do_for_each_ref_flags` further up
  refs: move `refs_head_ref_namespaced()`
  refs: remove unused `refs_for_each_include_root_ref()`
2026-03-03 11:08:25 -08:00
Junio C Hamano
f5bdf10342 Merge branch 'ps/fsck-stream-from-the-right-object-instance' into jch
"fsck" iterates over packfiles and its access to pack data caused
the list to be permuted, which caused it to loop forever; the code
to access pack data by "fsck" has been updated to avoid this.

* ps/fsck-stream-from-the-right-object-instance:
  pack-check: fix verification of large objects
  packfile: expose function to read object stream for an offset
  object-file: adapt `stream_object_signature()` to take a stream
  t/helper: improve "genrandom" test helper
2026-03-03 11:08:24 -08:00
Junio C Hamano
78ed313f4b Merge branch 'ob/core-attributesfile-in-repository' into jch
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.

* ob/core-attributesfile-in-repository:
  environment: move "branch.autoSetupMerge" into `struct repo_config_values`
  environment: stop using core.sparseCheckout globally
  environment: stop storing `core.attributesFile` globally
2026-03-03 11:08:24 -08:00
Junio C Hamano
473a9086d8 Merge branch 'ar/config-hooks' (early part) into jch
* 'ar/config-hooks' (early part):
  hook: add -z option to "git hook list"
  hook: allow out-of-repo 'git hook' invocations
  hook: allow event = "" to overwrite previous values
  hook: allow disabling config hooks
  hook: include hooks from the config
  hook: add "git hook list" command
  hook: run a list of hooks to prepare for multihook support
  hook: add internal state alloc/free callbacks
2026-03-03 11:08:24 -08:00
Junio C Hamano
eda937129e Merge branch 'pt/t7527-flake-workaround' into jch
Test fixup.

* pt/t7527-flake-workaround:
  t7527: fix flaky fsmonitor event tests with retry logic
2026-03-03 11:08:23 -08:00
Junio C Hamano
4253e60b4f Merge branch 'cx/fetch-display-ubfix' into jch
Undefined-behaviour fix in "git fetch".

* cx/fetch-display-ubfix:
  fetch: fix wrong evaluation order in URL trailing-slash trimming
2026-03-03 11:08:23 -08:00
Junio C Hamano
4e54c1c4d8 Merge branch 'ds/config-list-with-type' into jch
"git config list" is taught to show the values interpreted for
specific type with "--type=<X>" option.

* ds/config-list-with-type:
  config: use an enum for type
  config: restructure format_config()
  config: format colors quietly
  color: add color_parse_quietly()
  config: format expiry dates quietly
  config: format paths gently
  config: format bools or strings in helper
  config: format bools or ints gently
  config: format bools gently
  config: format int64s gently
  config: make 'git config list --type=<X>' work
  config: add 'gently' parameter to format_config()
  config: move show_all_config()
2026-03-03 11:08:23 -08:00
Junio C Hamano
e4ab8972f6 Merge branch 'en/merge-ort-almost-wo-the-repository' into jch
Mark the marge-ort codebase to prevent more uses of the_repository
from getting added.

* en/merge-ort-almost-wo-the-repository:
  replay: prevent the_repository from coming back
  merge-ort: prevent the_repository from coming back
  merge-ort: replace the_hash_algo with opt->repo->hash_algo
  merge-ort: replace the_repository with opt->repo
  merge-ort: pass repository to write_tree()
  merge,diff: remove the_repository check before prefetching blobs
2026-03-03 11:08:22 -08:00
Junio C Hamano
69b4bf4730 Merge branch 'lo/repo-leftover-bits' into jch
Clean-up the code around "git repo info" command.

* lo/repo-leftover-bits:
  Documentation/git-repo: capitalize format descriptions
  Documentation/git-repo: replace 'NUL' with '_NUL_'
  t1901: adjust nul format output instead of expected value
  t1900: rename t1900-repo to t1900-repo-info
  repo: rename struct field to repo_info_field
  repo: replace get_value_fn_for_key by get_repo_info_field
  repo: rename repo_info_fields to repo_info_field
  CodingGuidelines: instruct to name arrays in singular
2026-03-03 11:08:22 -08:00
Junio C Hamano
df47c9eb7e Merge branch 'ps/maintenance-geometric-default' into jch
"git maintenance" starts using the "geometric" strategy by default.

* ps/maintenance-geometric-default:
  builtin/maintenance: use "geometric" strategy by default
  t7900: prepare for switch of the default strategy
  t6500: explicitly use "gc" strategy
  t5510: explicitly use "gc" strategy
  t5400: explicitly use "gc" strategy
  t34xx: don't expire reflogs where it matters
  t: disable maintenance where we verify object database structure
  t: fix races caused by background maintenance
2026-03-03 11:08:22 -08:00
Junio C Hamano
3cc7ffa84c Merge branch 'jr/apply-directory-normalize' into jch
"git apply --directory=./un/../normalized/path" now normalizes the
given path before using it.

* jr/apply-directory-normalize:
  apply: normalize path in --directory argument
2026-03-03 11:08:22 -08:00
Junio C Hamano
5fe00d21c0 Merge branch 'sp/tree-diff-wo-the-repository' into jch
The last uses of the_repository in "tree-diff.c" have been
eradicated.

* sp/tree-diff-wo-the-repository:
  tree-diff: remove the usage of the_hash_algo global
2026-03-03 11:08:21 -08:00
Junio C Hamano
dbd44bebe7 Merge branch 'pw/no-more-NULL-means-current-worktree' into jch
API clean-up for the worktree subsystem.

* pw/no-more-NULL-means-current-worktree:
  path: remove repository argument from worktree_git_path()
  wt-status: avoid passing NULL worktree
2026-03-03 11:08:21 -08:00
Junio C Hamano
9f09093fca Merge branch 'bk/mailmap-wo-the-repository' into jch
Wean the mailmap code off of the_repository dependency.

* bk/mailmap-wo-the-repository:
  mailmap: drop global config variables
  mailmap: stop using the_repository
2026-03-03 11:08:21 -08:00
Junio C Hamano
5a9ff19394 Merge branch 'dk/meson-regen-config-list' into jch
Fix dependency screw-up in meson-based builds.

* dk/meson-regen-config-list:
  build: regenerate config-list.h when Documentation changes
2026-03-03 11:08:21 -08:00
Junio C Hamano
16b77869c8 Merge branch 'rr/gitweb-mobile' into jch
"gitweb" has been taught to be mobile friendly.

* rr/gitweb-mobile:
  gitweb: let page header grow on mobile for long wrapped project names
  gitweb: fix mobile footer overflow by wrapping text and clearing floats
  gitweb: fix mobile page overflow across log/commit/blob/diff views
  gitweb: prevent project search bar from overflowing on mobile
  gitweb: add viewport meta tag for mobile devices
2026-03-03 11:08:20 -08:00
Junio C Hamano
2bf7aba527 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.

* sp/shallow-deepen-relative-fix:
  shallow: handling fetch relative-deepen
  shallow: free local object_array allocations
2026-03-03 11:08:20 -08:00
Junio C Hamano
c88c327323 Merge branch 'kn/osxkeychain-buildfix' into jch
Simplify build procedure for oxskeychain (in contrib/).

* kn/osxkeychain-buildfix:
  osxkeychain: define build targets in the top-level Makefile.
2026-03-03 11:08:20 -08:00
Junio C Hamano
9463bd04b4 Merge branch 'hn/status-compare-with-push' into jch
"git status" learned to show comparison between the current branch
and various other branches listed on status.compareBranches
configuration.

* hn/status-compare-with-push:
  status: add status.compareBranches config for multiple branch comparisons
  refactor format_branch_comparison in preparation
2026-03-03 11:08:20 -08:00
Junio C Hamano
b3cac4e55a Merge branch 'kn/ref-location' into jch
Allow the directory in which reference backends store their data to
be specified.

* kn/ref-location:
  refs: add GIT_REFERENCE_BACKEND to specify reference backend
  refs: allow reference location in refstorage config
  refs: receive and use the reference storage payload
  refs: move out stub modification to generic layer
  refs: extract out `refs_create_refdir_stubs()`
  setup: don't modify repo in `create_reference_database()`
2026-03-03 11:08:19 -08:00
Junio C Hamano
19534ccd3a 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:
  builtin/receive-pack: avoid spinning no-op sideband async threads
  receive-pack: convert receive hooks to hook API
  receive-pack: convert update hooks to new API
  run-command: poll child input in addition to output
  hook: add jobs option
  reference-transaction: use hook API instead of run-command
  transport: convert pre-push to hook API
  hook: allow separate std[out|err] streams
  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 helper for pp child states
  t1800: add hook output stream tests
2026-03-03 11:08:19 -08:00
Junio C Hamano
50d063e335 The 10th batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-03 11:08:13 -08:00
Junio C Hamano
e924432393 Merge branch 'hy/diff-lazy-fetch-with-break-fix'
A prefetch call can be triggered to access a stale diff_queue entry
after diffcore-break breaks a filepair into two and freed the
original entry that is no longer used, leading to a segfault, which
has been corrected.

* hy/diff-lazy-fetch-with-break-fix:
  diffcore-break: avoid segfault with freed entries
2026-03-03 11:08:13 -08:00
Junio C Hamano
a751e79aca Merge branch 'aa/add-p-no-auto-advance'
"git add -p" learned a new mode that allows the user to revisit a
file that was already dealt with.

* aa/add-p-no-auto-advance:
  add-patch: allow interfile navigation when selecting hunks
  add-patch: allow all-or-none application of patches
  add-patch: modify patch_update_file() signature
  interactive -p: add new `--auto-advance` flag
2026-03-03 11:08:13 -08:00
Junio C Hamano
f19f1b6cf3 Merge branch 'lg/t2004-test-path-is-helpers'
Test code clean-up.

* lg/t2004-test-path-is-helpers:
  t2004: use test_path_is_file instead of test -f
2026-03-03 11:08:13 -08:00
Junio C Hamano
07ecbfa8fe Merge branch 'ps/simplify-normalize-path-copy-len'
Code clean-up.

* ps/simplify-normalize-path-copy-len:
  path: factor out skip_slashes() in normalize_path_copy_len()
2026-03-03 11:08:12 -08:00
Junio C Hamano
d455602a4d Merge branch 'sc/pack-redundant-leakfix'
Leakfix.

* sc/pack-redundant-leakfix:
  pack-redundant: fix memory leak when open_pack_index() fails
2026-03-03 11:08:12 -08:00
Junio C Hamano
2f9980cfeb Merge branch 'cs/subtree-split-fixes'
An earlier attempt to optimize "git subtree" discarded too much
relevant histories, which has been corrected.

* cs/subtree-split-fixes:
  contrib/subtree: process out-of-prefix subtrees
  contrib/subtree: test history depth
  contrib/subtree: capture additional test-cases
2026-03-03 11:08:12 -08:00
Junio C Hamano
4805bb9930 The 9th batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-02 17:06:53 -08:00
Junio C Hamano
9db3644607 Merge branch 'jt/object-file-use-container-of'
Code clean-up.

* jt/object-file-use-container-of:
  object-file.c: avoid container_of() of a NULL container
  object-file: use `container_of()` to convert from base types
2026-03-02 17:06:53 -08:00
Junio C Hamano
13763ecf7d Merge branch 'ps/receive-pack-shallow-optim'
The code to accept shallow "git push" has been optimized.

* ps/receive-pack-shallow-optim:
  commit: use commit graph in `lookup_commit_reference_gently()`
  commit: make `repo_parse_commit_no_graph()` more robust
  commit: avoid parsing non-commits in `lookup_commit_reference_gently()`
2026-03-02 17:06:53 -08:00
Junio C Hamano
34113149cf Merge branch 'kh/doc-patch-id-4'
Doc update.

* kh/doc-patch-id-4:
  doc: patch-id: see also git-cherry(1)
  doc: patch-id: add script example
  doc: patch-id: emphasize multi-patch processing
2026-03-02 17:06:53 -08:00
Junio C Hamano
427d39ca4f Merge branch 'ps/meson-gitk-git-gui'
Plumb gitk/git-gui build and install procedure in meson based
builds.

* ps/meson-gitk-git-gui:
  meson: wire up gitk and git-gui
2026-03-02 17:06:52 -08:00
Junio C Hamano
112252c844 Merge branch 'pw/meson-doc-mergetool'
Update build precedure for mergetool documentation in meson-based builds.

* pw/meson-doc-mergetool:
  meson: fix building mergetool docs
2026-03-02 17:06:52 -08:00
Junio C Hamano
05c4af5c8f Merge branch 'kh/doc-am-xref'
Doc update.

* kh/doc-am-xref:
  doc: am: fill out hook discussion
  doc: am: add missing config am.messageId
  doc: am: say that --message-id adds a trailer
  doc: am: normalize git(1) command links
2026-03-02 17:06:52 -08:00
Junio C Hamano
10dd04a3fe Merge branch 'ps/object-info-bits-cleanup'
A couple of bugs in use of flag bits around odb API has been
corrected, and the flag bits reordered.

* ps/object-info-bits-cleanup:
  odb: convert `odb_has_object()` flags into an enum
  odb: convert object info flags into an enum
  odb: drop gaps in object info flag values
  builtin/fsck: fix flags passed to `odb_has_object()`
  builtin/backfill: fix flags passed to `odb_has_object()`
2026-03-02 17:06:52 -08:00
Junio C Hamano
02c31a8ddc Merge branch 'ag/http-netrc-tests'
Additional tests were introduced to see the interaction with netrc
auth with auth failure on the http transport.

* ag/http-netrc-tests:
  t5550: add netrc tests for http 401/403
2026-03-02 17:06:51 -08:00
Junio C Hamano
664bd4e15a Merge branch 'ty/symlinks-use-unsigned-for-bitset'
Code clean-up.

* ty/symlinks-use-unsigned-for-bitset:
  symlinks: use unsigned int for flags
2026-03-02 17:06:51 -08:00
Junio C Hamano
146487360c Merge branch 'ps/validate-prefix-in-subtree-split'
"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-03-02 17:06:51 -08:00
Junio C Hamano
dbae219b22 Merge branch 'uk/signature-is-good-after-key-expires'
A signature on a commit that was GPG signed long time ago ought to
be still valid after the key that was used to sign it has expired,
but we showed them in alarming red.

* uk/signature-is-good-after-key-expires:
  gpg-interface: signatures by expired keys are fine
2026-03-02 17:06:50 -08:00
Junio C Hamano
9eb5b3b999 Merge branch 'ps/odb-for-each-object'
Revamp object enumeration API around odb.

* 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-03-02 17:06:50 -08:00
Adrian Ratiu
005f3fbe07 builtin/receive-pack: avoid spinning no-op sideband async threads
Exit early if the hooks do not exist, to avoid spinning up/down
sideband async threads which no-op.

It is important to call the hook_exists() API provided by hook.[ch]
because it covers both config-defined hooks and the "traditional"
hooks from the hookdir. find_hook() only covers the hookdir hooks.

The regression happened because the no-op async threads add some
additional overhead which can be measured with the receive-refs test
of the benchmarks suite [1].

Reproduced using:
cd benchmarks/receive-refs && \
./run --revisions /path/to/git \
fc148b146ad41be71a7852c4867f0773cbfe1ff9~,fc148b146ad41be71a7852c4867f0773cbfe1ff9 \
--parameter-list refformat reftable --parameter-list refcount 10000

1: https://gitlab.com/gitlab-org/data-access/git/benchmarks

Fixes: fc148b146a ("receive-pack: convert update hooks to new API")
Reported-by: Patrick Steinhardt <ps@pks.im>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
[jc: avoid duplicated hardcoded hook names]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-02 16:00:43 -08:00
Kristoffer Haugsbakk
ea3a62c40e doc: diff-options.adoc: make *.noprefix split translatable
We cannot split single words like what we did in the previous
commit. That is because the doc translations are processed in
bigger chunks.

Instead write the two paragraphs with the only variations being this
configuration variable.

Reported-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-02 08:53:28 -08:00
Junio C Hamano
2cc7191751 The 8th batch
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-02-27 15:11:55 -08:00
Junio C Hamano
e417bf2996 Merge branch 'ap/use-test-seq-f-more'
Test clean-up.

* ap/use-test-seq-f-more:
  t: use test_seq -f and pipes in a few more places
2026-02-27 15:11:55 -08:00