Commit Graph

80378 Commits

Author SHA1 Message Date
Junio C Hamano
3d18bd9552 Merge branch 'js/parseopt-subcommand-autocorrection' into seen
The parse-options library learned to auto-correct misspelt
subcommand name.

* js/parseopt-subcommand-autocorrection:
  SQUASH???
2026-03-11 17:23:34 -07:00
Junio C Hamano
9b69143b70 Merge branch 'mm/line-log-use-standard-diff-output' into seen
The way "git log -L<range>:<file>" feature is bolted onto the
log/diff machinery is being reworked a bit to make the feature
compatible with more diff options, like -S/G.

* mm/line-log-use-standard-diff-output:
  doc: note that -L supports patch formatting and pickaxe options
  t4211: add tests for -L with standard diff options
  line-log: route -L output through the standard diff pipeline
  line-log: fix crash when combined with pickaxe options
2026-03-11 17:23:34 -07:00
Junio C Hamano
a5d1cbe2a8 Merge branch 'ng/submodule-default-remote' into seen
Instead of hardcoded 'origin', use the configured default remote
when fetching from submodules.

Comments?

* ng/submodule-default-remote:
  submodule: fetch missing objects from default remote
2026-03-11 17:23:34 -07:00
Junio C Hamano
7f4026ac19 Merge branch 'ps/history-split' into seen
"git history" learned the "split" subcommand.

Comments?

* ps/history-split:
  builtin/history: implement "split" subcommand
  builtin/history: split out extended function to create commits
  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"
2026-03-11 17:23:33 -07:00
Junio C Hamano
1186f0f4ed Merge branch 'vp/http-rate-limit-retries' into seen
The HTTP transport learned to react to "429 Too Many Requests".

* vp/http-rate-limit-retries:
  http: add support for HTTP 429 rate limit retries
  remote-curl: introduce show_http_message_fatal() helper
  strbuf_attach: fix call sites to pass correct alloc
  strbuf: pass correct alloc to strbuf_attach() in strbuf_reencode()
2026-03-11 17:23:33 -07:00
Junio C Hamano
14aa659955 Merge branch 'jc/neuter-sideband-post-3.0' into seen
The final step, split from earlier attempt by Dscho, to loosen the
sideband restriction for now and tighten later at Git v3.0 boundary.

* jc/neuter-sideband-post-3.0:
  sideband: delay sanitizing by default to Git v3.0
2026-03-11 17:23:33 -07:00
Junio C Hamano
77867adb5a Merge branch 'ab/clone-default-object-filter' into seen
"git clone" learns to pay attention to "clone.<url>.defaultObjectFilter"
configuration and behave as if the "--filter=<filter-spec>" option
was given on the command line.

Comments?

* ab/clone-default-object-filter:
  clone: add clone.<url>.defaultObjectFilter config
2026-03-11 17:23:32 -07:00
Junio C Hamano
1df4b24819 Merge branch 'cs/subtree-split-recursion' into seen
When processing large history graphs on Debian or Ubuntu, "git
subtree" can die with a "recursion depth reached" error.

Comments?

* cs/subtree-split-recursion:
  contrib/subtree: reduce recursion during split
  contrib/subtree: functionalize split traversal
  contrib/subtree: reduce function side-effects
2026-03-11 17:23:32 -07:00
Junio C Hamano
5b29b00537 Merge branch 'ar/parallel-hooks' into seen
* ar/parallel-hooks:
  hook: allow runtime enabling extensions.hookStdoutToStderr
  hook: introduce extensions.hookStdoutToStderr
  hook: add per-event jobs config
  hook: add -j/--jobs option to git hook run
  hook: mark non-parallelizable hooks
  hook: allow parallel hook execution
  hook: parse the hook.jobs config
  config: add a repo_config_get_uint() helper
  repository: fix repo_init() memleak due to missing _clear()
2026-03-11 17:23:32 -07:00
Junio C Hamano
d4401c4582 Merge branch 'ar/config-hook-cleanups' into seen
Code clean-up around the recent "hooks defined in config" topic.

* ar/config-hook-cleanups:
  hook: show disabled hooks in "git hook list"
  hook: show config scope in git hook list
  hook: refactor hook_config_cache from strmap to named struct
  t1800: add test to verify hook execution ordering
  hook: make consistent use of friendly-name in docs
  hook: replace hook_list_clear() -> string_list_clear_func()
  hook: detect & emit two more bugs
  hook: rename cb_data_free/alloc -> hook_data_free/alloc
  hook: fix minor style issues
  hook: move unsorted_string_list_remove() to string-list.[ch]
2026-03-11 17:23:31 -07:00
Junio C Hamano
3500d90630 Merge branch 'js/parseopt-subcommand-autocorrection' (early part) into seen
* 'js/parseopt-subcommand-autocorrection' (early part):
  help: add tests for subcommand autocorrection
  parseopt: enable subcommand autocorrection for git-remote and git-notes
  parseopt: autocorrect mistyped subcommands
  autocorrect: provide config resolution API
  autocorrect: rename AUTOCORRECT_SHOW to AUTOCORRECT_HINTONLY
  help: move tty check for autocorrection to autocorrect.c
  help: make autocorrect handling reusable
  parseopt: extract subcommand handling from parse_options_step()
2026-03-11 17:23:31 -07:00
Junio C Hamano
8732c8be42 Merge branch 'jt/fast-import-sign-again' into seen
"git fast-import" learned to optionally replace signature on
commits whose signature gets invalidated due to replaying by
signing afresh.

* jt/fast-import-sign-again:
  fast-import: add mode to sign commits with invalid signatures
  gpg-interface: introduce sign_buffer_with_key()
  commit: remove unused forward declaration
2026-03-11 17:23:31 -07:00
Junio C Hamano
ef0c422977 Merge branch 'ms/t7605-test-path-is-helpers' into seen
Test updates.

* ms/t7605-test-path-is-helpers:
  t7605: use test_path_is_file instead of test -f
2026-03-11 17:23:30 -07:00
Junio C Hamano
67b6fbee15 Merge branch 'ps/editorconfig-unanchor' into jch
Editorconfig filename patterns were specified incorrectly, making
many source files inside subdirectories uncovered, which has been
corrected.

* ps/editorconfig-unanchor:
  editorconfig: fix style not applying to subdirs anymore
2026-03-11 17:23:15 -07:00
Junio C Hamano
5616515b32 Merge branch 'ss/t3200-test-zero-oid' into jch
A test now use symbolic constant $ZERO_OID instead of 40 "0" to
work better with SHA-256 as well as SHA-1.

* ss/t3200-test-zero-oid:
  t3200: replace hardcoded null OID with $ZERO_OID
2026-03-11 17:23:15 -07:00
Junio C Hamano
d577c4c4f0 Merge branch 'ss/submodule--helper-use-xmalloc' into jch
Code clean-up.

* ss/submodule--helper-use-xmalloc:
  submodule--helper: replace malloc with xmalloc
2026-03-11 17:23:14 -07:00
Junio C Hamano
39db3bf748 Merge branch 'ps/unit-test-c-escape-names.txt' into jch
The unit test helper function was taught to use backslash +
mneomnic notation for certain control characters like "\t", instead
of octal notation like "\011".

* ps/unit-test-c-escape-names.txt:
  test-lib: print escape sequence names
2026-03-11 17:23:14 -07:00
Junio C Hamano
556f35fbc6 Merge branch 'bb/imap-send-openssl-4.0-prep' into jch
"imap-send" used to use functions whose use is going to be removed
with OpenSSL 4.0; rewrite them using public API that has been
available since OpenSSL 1.1 since 2016 or so.

Comments?

* bb/imap-send-openssl-4.0-prep:
  imap-send: move common code into function host_matches()
  imap-send: use the OpenSSL API to access the subject common name
  imap-send: use the OpenSSL API to access the subject alternative names
2026-03-11 17:23:14 -07:00
Beat Bolli
6392a0b75d imap-send: move common code into function host_matches()
Move the ASN1_STRING access, the associated cast and the check for
embedded NUL bytes into host_matches() to simplify both callers.

Reformulate the NUL check using memchr() and add a comment to make it
more obvious what it is about.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-11 15:25:15 -07:00
Beat Bolli
08fd302fc4 imap-send: use the OpenSSL API to access the subject common name
The OpenSSL 4.0 master branch has deprecated the
X509_NAME_get_text_by_NID function. Use the recommended replacement APIs
instead. They have existed since OpenSSL v1.1.0.

Take care to get the constness right for pre-4.0 versions.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-11 15:25:15 -07:00
Beat Bolli
dfcdd0b960 imap-send: use the OpenSSL API to access the subject alternative names
The OpenSSL 4.0 master branch has made the ASN1_STRING structure opaque,
forbidding access to its internal fields. Use the official accessor
functions instead. They have existed since OpenSSL v1.1.0.

Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-11 15:25:15 -07:00
Junio C Hamano
51f44784a0 SQUASH??? 2026-03-11 15:23:08 -07:00
Junio C Hamano
1b2493afe8 Merge branch 'dd/list-objects-filter-options-wo-strbuf-split' into jch
Revamp the way combined option filter is parsed.

* dd/list-objects-filter-options-wo-strbuf-split:
  list-objects-filter-options: avoid strbuf_split_str()
  worktree: do not pass strbuf by value
2026-03-11 14:58:07 -07:00
Junio C Hamano
b68729c3e4 Merge branch 'ps/build-tweaks' into jch
Tweak the build infrastructure by moving tools around.

* ps/build-tweaks:
  meson: precompile "git-compat-util.h"
  meson: compile compatibility sources separately
  git-compat-util.h: move warning infra to prepare for PCHs
  builds: move build scripts into "tools/"
  contrib: move "update-unicode.sh" script into "tools/"
  contrib: move "coverage-diff.sh" script into "tools/"
  contrib: move "coccinelle/" directory into "tools/"
  Introduce new "tools/" directory
2026-03-11 14:58:07 -07:00
Junio C Hamano
8bc210b6a7 Merge branch 'ps/object-counting' into jch
The logic to count objects has been cleaned up.

* ps/object-counting:
  odb: introduce generic object counting
  odb/source: introduce generic object counting
  object-file: generalize counting objects
  object-file: extract logic to approximate object count
  packfile: extract logic to count number of objects
  odb: stop including "odb/source.h"
2026-03-11 14:58:06 -07:00
Junio C Hamano
d94f2dc713 Merge branch 'ty/doc-diff-u-wo-number' into jch
"git diff -U<num>" was too lenient in its command line parsing and
took an empty strings as a valid <num>.

* ty/doc-diff-u-wo-number:
  diff: document -U without <n> as using default context
2026-03-11 14:58:03 -07:00
Junio C Hamano
538a430c09 Merge branch 'mf/apply-p-no-atoi' into jch
"git apply -p<n>" parses <n> more carefully now.

* mf/apply-p-no-atoi:
  apply.c: fix -p argument parsing
2026-03-11 14:58:02 -07:00
Junio C Hamano
c20eb2cd8c Merge branch 'jc/doc-wholesale-replace-before-next' into jch
Doc update.

* jc/doc-wholesale-replace-before-next:
  SubmittingPatches: spell out "replace fully to pretend to be perfect"
2026-03-11 14:58:01 -07:00
Junio C Hamano
fe71e7658f Merge branch 'cf/constness-fixes' into jch
Small code clean-up around constness area.

* cf/constness-fixes:
  dir: avoid -Wdiscarded-qualifiers in remove_path()
  bloom: remove a misleading const qualifier
2026-03-11 14:58:01 -07:00
Junio C Hamano
db6c37d3a5 Merge branch 'pt/promisor-lazy-fetch-no-recurse' into jch
The mechanism to avoid recursive lazy-fetch from promisor remotes
were not propagated properly to child "git fetch" processes, which
has been corrected.

Comments?

* pt/promisor-lazy-fetch-no-recurse:
  promisor-remote: prevent lazy-fetch recursion in child fetch
2026-03-11 14:58:00 -07:00
Junio C Hamano
f224753680 Merge branch 'pt/fsmonitor-linux' into jch
The fsmonitor daemon has been implemented for Linux.

* pt/fsmonitor-linux:
  fsmonitor: convert shown khash to strset in do_handle_client
  fsmonitor: add tests for Linux
  fsmonitor: add timeout to daemon stop command
  fsmonitor: close inherited file descriptors and detach in daemon
  run-command: add close_fd_above_stderr option
  fsmonitor: implement filesystem change listener for Linux
  fsmonitor: rename fsm-settings-darwin.c to fsm-settings-unix.c
  fsmonitor: rename fsm-ipc-darwin.c to fsm-ipc-unix.c
  fsmonitor: use pthread_cond_timedwait for cookie wait
  compat/win32: add pthread_cond_timedwait
  fsmonitor: fix hashmap memory leak in fsmonitor_run_daemon
  fsmonitor: fix khash memory leak in do_handle_client
2026-03-11 14:58:00 -07:00
Junio C Hamano
6c5a142af9 Merge branch 'ps/upload-pack-buffer-more-writes' into jch
Reduce system overhead "git upload-pack" spends relaying "git
pack-objects" output to the "git fetch" running on the other end of
the connection.

* ps/upload-pack-buffer-more-writes:
  builtin/pack-objects: reduce lock contention when writing packfile data
  csum-file: drop `hashfd_throughput()`
  csum-file: introduce `hashfd_ext()`
  sideband: use writev(3p) to send pktlines
  wrapper: introduce writev(3p) wrappers
  compat/posix: introduce writev(3p) wrapper
  upload-pack: reduce lock contention when writing packfile data
  upload-pack: prefer flushing data over sending keepalive
  upload-pack: adapt keepalives based on buffering
  upload-pack: fix debug statement when flushing packfile data
2026-03-11 14:57:59 -07:00
Junio C Hamano
91d4aa41cc Merge branch 'tb/incremental-midx-part-3.2' into jch
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
  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-03-11 14:57:58 -07:00
Junio C Hamano
eeaef6dc77 Merge branch 'lc/rebase-trailer' into jch
"git rebase" learns "--trailer" command to drive the
interpret-trailers machinery.

Comments?

* lc/rebase-trailer:
  rebase: support --trailer
  commit, tag: parse --trailer with OPT_STRVEC
  trailer: append trailers without fork/exec
  trailer: libify a couple of functions
  interpret-trailers: refactor create_in_place_tempfile()
  interpret-trailers: factor trailer rewriting
2026-03-11 14:57:57 -07:00
Junio C Hamano
4f629ada00 Merge branch 'ac/help-sort-correctly' into jch
The code in "git help" that shows configuration items in sorted
order was awkwardly organized and prone to bugs.

* ac/help-sort-correctly:
  help: cleanup the contruction of keys_uniq
2026-03-11 14:57:56 -07:00
Junio C Hamano
2e41b00a95 Merge branch 'jc/test-allow-sed-with-ere' into jch
* jc/test-allow-sed-with-ere:
  t: allow use of "sed -E"
2026-03-11 14:57:55 -07:00
Junio C Hamano
be430f4eaa t: allow use of "sed -E"
Since early 2019 with e62e225f (test-lint: only use only sed [-n]
[-e command] [-f command_file], 2019-01-20), we have been trying to
limit the options of "sed" we use in our tests to "-e <pattern>",
"-n", and "-f <file>".

Before the commit, we were trying to reject only "-i" (which is one
of the really-not-portable options), but the commit explicitly
wanted to reject use of "-E" (use ERE instead of BRE).  The commit
cites the then-current POSIX.1 (Issue 7, 2018 edition) to show that
"even recent POSIX does not have it!", but the latest edition (Issue
8) documents "-E" as an option to use ERE.

But that was 7 years ago, and that is a long time for many things to
happen.

Besides, we have been using "sed -E" without the check in question
triggering in one of the scripts since 2022, with 461fec41 (bisect
run: keep some of the post-v2.30.0 output, 2022-11-10).  It was
hidden because the 'E' was squished with another single letter
option.

t/t6030-bisect-porcelain.sh:	sed -En 's/.*(bisect...

This escaped the rather simple pattern used in the checker

    /\bsed\s+-[^efn]\s+/ and err 'sed option not portable...';

because -E did not appear as a singleton.

Let's change the rule to allow the "-E" option, which nobody has
complained against for the past 3 years.  We rewrite our first use
of the "-E" option so that it is caught by the old rule, primarily
because we do not want to teach our mischievous developers how to
smuggle in an unwanted option undetected by the test lint.  And at
the same time, loosen the pattern to allow "-E" the same way we
allow "-n" and friends.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-03-11 14:49:01 -07:00
Junio C Hamano
059595c606 Merge branch 'sa/replay-revert' into jch
"git replay" (experimental) learns, in addition to "pick" and
"replay", a new operating mode "revert".

* sa/replay-revert:
  replay: add --revert mode to reverse commit changes
  sequencer: extract revert message formatting into shared function
2026-03-11 12:53:58 -07:00
Junio C Hamano
5b8059c178 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.

* yc/histogram-hunk-shift-fix:
  xdiff: re-diff shifted change groups when using histogram algorithm
2026-03-11 12:53:57 -07:00
Junio C Hamano
3d020161d7 Merge branch 'jc/neuter-sideband-fixup' into jch
Try to resurrect and reboot a stalled "avoid sending risky escape
sequences taken from sideband to the terminal" topic by Dscho.  The
plan is to keep it in 'next' long enough to see if anybody screams
with the "everything dropped except for ANSI color escape sequence"
default.

Comments?

* jc/neuter-sideband-fixup:
  sideband: drop 'default' configuration
  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-03-11 12:53:57 -07:00
Junio C Hamano
5d0ffb1691 Merge branch 'ps/t9200-test-path-is-helpers' into jch
Test update.

* ps/t9200-test-path-is-helpers:
  t9200: handle missing CVS with skip_all
2026-03-11 12:53:57 -07:00
Junio C Hamano
269a6e327a ### match next 2026-03-11 12:53:57 -07:00
Junio C Hamano
092e405f52 Merge branch 'ty/patch-ids-document-lazy-eval' into jch
In-code comment update to record a design decision to allow lazy
computation of patch IDs.

* ty/patch-ids-document-lazy-eval:
  patch-ids: document intentional const-casting in patch_id_neq()
2026-03-11 12:53:57 -07:00
Junio C Hamano
83f966f9b4 Merge branch 'rs/history-ergonomics-updates-fix' into jch
Fix use of uninitialized variable.

* rs/history-ergonomics-updates-fix:
  history: initialize rev_info in cmd_history_reword()
2026-03-11 12:53:56 -07:00
Junio C Hamano
9a5775b305 Merge branch 'jk/unleak-mmap' into jch
Plug a few leaks where mmap'ed memory regions are not unmapped.

* jk/unleak-mmap:
  meson: turn on NO_MMAP when building with LSan
  Makefile: turn on NO_MMAP when building with LSan
  object-file: fix mmap() leak in odb_source_loose_read_object_stream()
  pack-revindex: avoid double-loading .rev files
  check_connected(): fix leak of pack-index mmap
  check_connected(): delay opening new_pack
2026-03-11 12:53:56 -07:00
Junio C Hamano
2a55b15cdb Merge branch 'ty/setup-error-tightening' into jch
While discovering a ".git" directory, the code treats any stat()
failure as a sign that a filesystem entity .git does not exist
there, and ignores ".git" that is not a "gitdir" file or a
directory.  The code has been tightened to notice and report
filesystem corruption better.

* ty/setup-error-tightening:
  setup: improve error diagnosis for invalid .git files
2026-03-11 12:53:56 -07:00
Junio C Hamano
0336bc269d Merge branch 'os/doc-git-custom-commands' into jch
Doc update.

* os/doc-git-custom-commands:
  doc: make it easier to find custom command information
2026-03-11 12:53:56 -07:00
Junio C Hamano
134acc020b Merge branch 'fp/t3310-unhide-git-failures' into jch
The construct 'test "$(command)" = expectation' loses the exit
status from the command, which has been fixed by breaking up the
statement into pieces.

* fp/t3310-unhide-git-failures:
  t3310: avoid hiding failures from rev-parse in command substitutions
2026-03-11 12:53:55 -07:00
Junio C Hamano
068c1b8afc Merge branch 'mf/format-patch-cover-letter-format' into jch
"git format-patch --cover-letter" learns to use a simpler format
instead of the traditional shortlog format to list its commits with
a new --cover-letter-format option and format.commitListFormat
configuration variable.

* mf/format-patch-cover-letter-format:
  docs: add usage for the cover-letter fmt feature
  format-patch: add commitListFormat config
  format-patch: add ability to use alt cover format
  format-patch: move cover letter summary generation
  pretty.c: add %(count) and %(total) placeholders
2026-03-11 12:53:55 -07:00
Junio C Hamano
78503bb685 Merge branch 'jt/repo-structure-extrema' into jch
"git repo structure" command learns to report maximum values on
various aspects of objects it inspects.

* jt/repo-structure-extrema:
  builtin/repo: find tree with most entries
  builtin/repo: find commit with most parents
  builtin/repo: add OID annotations to table output
  builtin/repo: collect largest inflated objects
  builtin/repo: add helper for printing keyvalue output
  builtin/repo: update stats for each object
2026-03-11 12:53:55 -07:00