* Re: [PATCH 1/3] t/lib-httpd: bump apache timeout
From: Michael Montalbo @ 2026-07-02 3:24 UTC (permalink / raw)
To: Jeff King; +Cc: Patrick Steinhardt, git, Junio C Hamano
In-Reply-To: <20260628080009.GA107826@coredump.intra.peff.net>
On Sun, Jun 28, 2026 at 1:00 AM Jeff King <peff@peff.net> wrote:
>
> I didn't reference Michael's bugzilla report directly, because you can't
> read it without a login. :(
>
> Maybe it's worth doing anyway?
>
I also thought the report being behind a login was unfortunate. For the
historical record, I ended up submitting a patch[1] to their public GitHub
mirror that describes the issue in more detail.
[1] https://github.com/apache/httpd/pull/676
^ permalink raw reply
* Re: [PATCH v2] Makefile: link osxkeychain & support universal Rust
From: Junio C Hamano @ 2026-07-02 1:35 UTC (permalink / raw)
To: Shardul Natu via GitGitGadget
Cc: git, Kristoffer Haugsbakk, Shnatu, Koji Nakamaru
In-Reply-To: <pull.2288.v2.git.git.1782943303219.gitgitgadget@gmail.com>
"Shardul Natu via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Shnatu <snatu@google.com>
> Signed-off-by: Shardul Natu <snatu@google.com>
You'd want to make sure these two match.
> To implement this cleanly without complex shell scripting in recipes:
> 1. We introduce a declarative Make pattern rule (target/%/...) to
> compile each target-specific library slice (e.g.,
> target/aarch64-apple-darwin/...).
> 2. We update the $(RUST_LIB) recipe to depend on the list of
> compiled target-specific member libraries ($(RUST_MEMBER_LIBS)).
> 3. On macOS, if multiple targets are specified, we use lipo to
> combine them into a single Universal static library at
> target/release/libgitcore.a.
> 4. If only one target is specified, we copy it to the standard
> path.
> 5. We enforce that building for multiple targets requires macOS
> (as lipo is only available there), raising a clear make error
> on other platforms.
>
> This is a highly elegant and native Makefile solution that avoids
> complex shell scripting in recipes and fully supports macOS Universal
> Binaries.
You're the second person on this list I saw who calls their own
creation "elegant" ;-).
> +$(RUST_LIB): $(RUST_MEMBER_LIBS)
> + $(QUIET_GEN)\
> + if [ $(words $(RUST_TARGETS)) -gt 1 ]; then \
> + lipo -create $^ -output $@; \
> + else \
> + cp $< $@; \
> + fi
> +endif
Do we know that leading directories to $(RUST_LIB) target has
already been created at this point? If not, we may want to have
$(RUST_LIB): $(RUST_MEMBER_LIBS)
+ $(call mkdir_p_parent_template)
$(QUIET_GEN)\
if [ $(words $(RUST_TARGETS)) -gt 1 ]; then \
lipo -create $^ -output $@; \
on top.
Thanks for making the build procedure better.
^ permalink raw reply
* What's cooking in git.git (Jul 2026, #01)
From: Junio C Hamano @ 2026-07-01 23:40 UTC (permalink / raw)
To: git
Here are the topics that have been cooking in my tree. Commits
prefixed with '+' are in 'next' (being in 'next' is a sign that a
topic is stable enough to be used and is a candidate to be in a
future release). Commits prefixed with '-' are only in 'seen', and
aren't considered "accepted" at all. They may be annotated with a URL
to a message that raises issues but they are by no means exhaustive.
A topic without enough support may be discarded after a long period
of no activity (of course, it can be resubmitted when new interest
arises).
Git 2.55 (final) has been tagged. The next release is tentatively
called Git 2.56. This week is the 0th week of the cycle, which is
time to see if there are any brown paper bag breakages and
regressions we need to fix. Next week, I plan to start merging the
topics that have been cooking in 'next' down to 'master'. It has
been customary to rewind 'next' and rebuild it on top of 'master'
soon after a major release, but IIRC, we didn't do so in Git 2.55;
perhaps we can do without rebuilding it this cycle as well. We'll
see.
Copies of the source code to Git live in many repositories, and the
following is a list of the ones I push into or their mirrors. Some
repositories have only a subset of branches.
With maint, master, next, seen, todo:
git://git.kernel.org/pub/scm/git/git.git/
git://repo.or.cz/alt-git.git/
https://kernel.googlesource.com/pub/scm/git/git/
https://github.com/git/git/
https://gitlab.com/git-scm/git/
With all the integration branches and topics broken out:
https://github.com/gitster/git/
Even though the preformatted documentation in HTML and man format
are not sources, they are published in these repositories for
convenience (replace "htmldocs" with "manpages" for the manual
pages):
git://git.kernel.org/pub/scm/git/git-htmldocs.git/
https://github.com/gitster/git-htmldocs.git/
Release tarballs are available at:
https://www.kernel.org/pub/software/scm/git/
--------------------------------------------------
[New Topics]
* kk/commit-reach-find-all-fix (2026-06-29) 2 commits
- commit-reach: guard !FIND_ALL early exit with generation ordering check
- t6600: add test for merge-base early exit with clock skew
The early-exit optimization in paint_down_to_common() has been gated
on the queue being generation-ordered. This fixes a bug where git
merge-base (without --all) could return incorrect results on
repositories with v1 commit graphs and clock skew.
Comments?
cf. <xmqqa4sdw55v.fsf@gitster.g>
source: <pull.2162.git.1782739162.gitgitgadget@gmail.com>
* bl/t7412-use-test-path-helpers (2026-06-29) 1 commit
- submodule absorbgitdirs tests: use test_* helper functions
t7412 that tests "git submodule absorbgitdirs" has been modernized to
use test_path_is_file, test_path_is_dir, and test_path_is_missing
helper functions instead of raw "test -[fde]" commands.
Waiting for response(s) to review comment(s).
cf. <akTKHfKPsP3-Rn31@pks.im>
source: <20260630020220.1559190-1-bblima@usp.br>
* jk/format-patch-leakfix (2026-06-29) 2 commits
- format-patch: fix leak of rev_info in prepare_bases()
- t: move LSan errors from stdout to stderr
A memory leak in the '--base' handling of 'git format-patch' has been
plugged, and the leak-reporting of the test suite when running under a
TAP harness has been improved.
Will merge to 'next'?
cf. <akOZy-BygZS8fqPM@pks.im>
source: <20260630063944.GA3733670@coredump.intra.peff.net>
* ps/setup-split-discovery-and-setup (2026-06-30) 16 commits
- setup: mark `set_git_work_tree()` as file-local
- setup: pass worktree to `init_db()`
- setup: drop redundant configuration of `startup_info->have_repository`
- setup: make repository discovery self-contained
- setup: propagate prefix via repository discovery
- setup: drop static `cwd` variable
- setup: move prefix into repository
- setup: embed repository format in discovery
- setup: introduce explicit repository discovery
- setup: split up concerns of `setup_git_env_internal()`
- setup: unify setup of shallow file
- setup: mark bogus worktree in `apply_repository_format()`
- setup: rename `check_repository_format_gently()`
- Merge branch 'jk/repo-info-path-keys' into ps/setup-split-discovery-and-setup
- Merge branch 'ps/setup-drop-global-state' into ps/setup-split-discovery-and-setup
- Merge branch 'ps/refs-onbranch-fixes' into ps/setup-split-discovery-and-setup
(this branch uses jk/repo-info-path-keys, ps/refs-onbranch-fixes and ps/setup-drop-global-state.)
The repository discovery and repository configuration phases, which
were previously intertwined in 'setup.c', have been split. Repository
discovery now populates a 'struct repo_discovery' without modifying
the repository state, and repository configuration takes this
structure to initialize the repository, paving the way for clean
unification of repository configuration.
Needs review.
source: <20260630-pks-setup-split-discovery-and-setup-v1-0-13864eb5a032@pks.im>
* pw/rebase-drop-notes-with-commit (2026-06-30) 15 commits
- amend! sequencer: simplify pick_one_commit()
- amend! sequencer: remove unnecessary "or" in pick_one_commit()
- fixup! sequencer: never reschedule on failed commit
- fixup! sequencer: be more careful with external merge
- sequencer: do not record dropped commits as rewritten
- sequencer: use an enum to represent result of picking a commit
- sequencer: return early from pick_one_commit() on success
- sequencer: simplify pick_one_commit()
- sequencer: remove unnecessary condition in pick_one_commit()
- sequencer: simplify handing of fixup with conflicts
- sequencer: remove unnecessary "or" in pick_one_commit()
- sequencer: never reschedule on failed commit
- sequencer: be more careful with external merge
- sequencer: move definition of is_final_fixup()
- t3400: restore coverage for note copying with apply backend
The rebase post-rewrite notes-copying logic has been corrected. When a
commit is dropped during rebase (e.g., because its changes are already
upstream), we no longer record it as rewritten, preventing its notes
from being copied to an unrelated commit.
Expecting a reroll.
cf. <dce74d17-eefd-40bb-82f3-f6b3179cc2b6@gmail.com>
source: <cover.1782833268.git.phillip.wood@dunelm.org.uk>
* jk/bloom-leak-fixes (2026-06-30) 3 commits
- line-log: drop extra copy of range with bloom filters
- revision: avoid leaking bloom keyvecs with multiple traversals
- bloom: make bloom-filter slab initialization idempotent
Plug various memory leaks in the Bloom-filter code paths that are
exposed when running tests with the
`GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS=1` environment variable.
Will merge to 'next'?
cf. <xmqqo6gqobrt.fsf@gitster.g>
source: <20260701063538.GA2579765@coredump.intra.peff.net>
* js/ci-dockerized-pid-limit (2026-07-01) 1 commit
- ci(dockerized): reduce the PID limit for private repositories
Dockerized CI jobs running in private GitHub repositories have been
adjusted to use explicit process and file limits, preventing resource
exhaustion errors on private runners.
Waiting for response(s) to review comment(s).
cf. <xmqq5x2yps4c.fsf@gitster.g>
source: <pull.2164.git.1782889484346.gitgitgadget@gmail.com>
* js/coverity-fixes (2026-07-01) 13 commits
- mingw: make exit_process() own the process handle on all paths
- fsmonitor: plug token-data leak on early daemon-startup failures
- reftable/table: release filter on error path
- imap-send: avoid leaking the IMAP upload buffer
- worktree: fix resource leaks when branch creation fails
- submodule: fix cwd leak in get_superproject_working_tree()
- dir: free allocations on parse-error paths in read_one_dir()
- line-log: avoid redundant copy that leaks in process_ranges
- run_diff_files: avoid memory leak
- run-command: avoid close(-1) in start_command() error paths
- download_https_uri_to_file(): do not leak fd upon failure
- loose: avoid closing invalid fd on error path
- load_one_loose_object_map(): fix resource leak
A collection of fixes for various resource leaks, invalid file
descriptor closures, and process handle ownership issues flagged by
Coverity.
Waiting for response(s) to review comment(s).
cf. <akTIMM6qLfDNdg-a@pks.im>
source: <pull.2163.git.1782889472.gitgitgadget@gmail.com>
--------------------------------------------------
[Stalled]
* ap/http-redirect-wwwauth-fix (2026-06-02) 1 commit
- http: preserve wwwauth_headers across redirects
When cURL follows a redirect, the WWW-Authenticate headers from the
redirect target were lost because credential_from_url() cleared the
credential state. This has been fixed by preserving the collected
headers across the redirect update.
Expecting a reroll for too long, stalled.
cf. <5144a29d-a53f-4446-beff-e1f549345bf9@nvidia.com>
source: <20260602161150.1527493-1-aplattner@nvidia.com>
* jt/config-lock-timeout (2026-05-17) 1 commit
- config: retry acquiring config.lock, configurable via core.configLockTimeout
Configuration file locking now retries for a short period, avoiding
failures when multiple processes attempt to update the configuration
simultaneously.
Waiting for response(s) to review comment(s) for too long, stalled.
cf. <agrIrGwSMFlKTx9x@pks.im>
source: <20260517132111.1014901-1-joerg@thalheim.io>
* js/parseopt-subcommand-autocorrection (2026-04-27) 11 commits
- SQUASH???
- doc: document autocorrect API
- parseopt: 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_HINT
- autocorrect: use mode and delay instead of magic numbers
- help: move tty check for autocorrection to autocorrect.c
- help: make autocorrect handling reusable
- parseopt: extract subcommand handling from parse_options_step()
The parse-options library learned to auto-correct misspelled
subcommand names.
Waiting for response(s) to review comment(s) for too long, stalled.
cf. <xmqq33yzd9yf.fsf@gitster.g>
cf. <SY0P300MB0801E50FCB7EB2F45CD15208CE042@SY0P300MB0801.AUSP300.PROD.OUTLOOK.COM>
source: <SY0P300MB0801677A2A1E0FD38D06A841CE2A2@SY0P300MB0801.AUSP300.PROD.OUTLOOK.COM>
* cl/conditional-config-on-worktree-path (2026-05-24) 2 commits
- config: add "worktree" and "worktree/i" includeIf conditions
- config: refactor include_by_gitdir() into include_by_path()
The [includeIf "condition"] conditional inclusion facility for
configuration files has learned to use the location of worktree
in its condition.
Waiting for response(s) to review comment(s) for too long, stalled.
cf. <xmqq8q97et9b.fsf@gitster.g>
source: <20260525-includeif-worktree-v5-0-1efe525d025a@black-desk.cn>
--------------------------------------------------
[Cooking]
* tb/repack-geometric-cruft (2026-06-28) 11 commits
- SQUASH??? bare grep !???
- repack: support combining '--geometric' with '--cruft'
- pack-objects: support '--refs-snapshot' with 'follow-reachable'
- pack-objects: introduce '--stdin-packs=follow-reachable'
- pack-objects: extract `stdin_packs_add_all_pack_entries()`
- repack-geometry: drop unused redundant-pack removal
- repack: delete geometric packs via existing_packs
- repack: teach MIDX retention about geometric rollups
- repack: mark geometric progression of packs as retained
- repack: extract `locate_existing_pack()` helper
- repack: unconditionally exclude non-kept packs
Teach `git repack` to accept `--geometric` and `--cruft`
together. When both are given, the geometric repack rolls up non-cruft
packs as usual, while a separate cruft pack is written to collect
unreachable objects.
Expecting a reroll.
cf. <akTIMM6qLfDNdg-a@pks.im>
source: <cover.1782500507.git.me@ttaylorr.com>
* jk/reftable-leakfix (2026-06-28) 1 commit
- reftable: fix unlikely leak on API error
Leakfix.
Will merge to 'next'.
cf. <akIPBJLtPqDjQt-A@pks.im>
source: <20260628090314.GA661068@coredump.intra.peff.net>
* sg/t3420-do-not-grep-in-missing-file (2021-10-10) 1 commit
(merged to 'next' on 2026-06-29 at 2bf33c6a40)
+ t3420-rebase-autostash: don't try to grep non-existing files
Test fix.
Will merge to 'master'.
source: <20211010172809.1472914-1-szeder.dev@gmail.com>
* ad/gpg-strip-cr-before-lf (2026-06-24) 1 commit
- gpg-interface: fix strip_cr_before_lf to only remove CR before LF
The GPG and SSH signature parsing code has been corrected to strip
carriage return characters only when they immediately precede line
feeds, instead of unconditionally stripping all carriage returns.
Will merge to 'next'.
source: <20260624093618.17456-1-antonio.destefani08@gmail.com>
* jt/receive-pack-use-odb-transactions (2026-06-23) 6 commits
- builtin/receive-pack: stage incoming objects via ODB transactions
- odb/transaction: add transaction env interface
- odb/transaction: propagate commit errors
- odb/transaction: propagate begin errors
- object-file: propagate files transaction errors
- object-file: rename files transaction prepare function
git-receive-pack has been refactored to use ODB transaction
interfaces instead of directly managing tmp_objdir for staging
incoming objects, bringing it closer to being ODB backend agnostic.
Expecting a reroll.
cf. <aju_AmlKVi5UZaiQ@pks.im>
cf. <akK05yZ6843K8Vdd@denethor>
cf. <akLLB_J-pvJ7iR7c@denethor>
source: <20260624041920.2601961-1-jltobler@gmail.com>
* ps/odb-drop-whence (2026-06-24) 7 commits
- odb: document object info fields
- odb: drop `whence` field from object info
- treewide: convert users of `whence` to the new source field
- odb: add `source` field to struct object_info_source
- odb: make backend-specific fields optional
- packfile: thread odb_source_packed through packed_object_info()
- Merge branch 'ps/odb-source-packed' into ps/odb-drop-whence
(this branch uses ps/odb-source-packed.)
The whence field in struct object_info has been removed,
refactoring backend-specific object information retrieval into an
opt-in struct object_info_source structure.
Will merge to 'next'?
cf. <akOod6X1a2axIXKZ@pks.im>
cf. <xmqqv7b0rmt6.fsf@gitster.g>
source: <20260624-b4-pks-odb-drop-whence-v1-0-8d1877b790ac@pks.im>
* ps/reftable-hardening (2026-06-29) 12 commits
- reftable/table: fix OOB read on truncated table
- reftable/table: fix NULL pointer access when seeking to bogus offsets
- reftable/block: fix OOB read with bogus restart offset
- reftable/block: fix use of uninitialized memory when binsearch fails
- reftable/block: fix OOB read with bogus restart count
- reftable/block: fix OOB read with bogus block size
- reftable/block: fix OOB write with bogus inflated log size
- t/unit-tests: introduce test helper to write reftable blocks
- reftable/record: don't abort when decoding invalid ref value type
- reftable/basics: fix OOB read on binary search of empty range
- oss-fuzz: add fuzzer for parsing reftables
- meson: support building fuzzers with libFuzzer
The reftable code has been hardened against corrupted tables by
fixing out-of-bounds writes, out-of-bounds reads, and abort calls
during parsing.
Needs review.
source: <20260629-pks-reftable-hardening-v2-0-b0228e7d908d@pks.im>
* hn/branch-push-slip-advice (2026-06-27) 2 commits
- push: suggest <remote> <branch> for a slash slip
- branch: suggest <remote>/<branch> on upstream slip
"git push origin/main" and "git branch origin main" could both be
an obvious typo, in which case offer the obvious typofix.
Will merge to 'next'.
cf. <xmqqfr272lq7.fsf@gitster.g>
source: <pull.2331.v3.git.git.1782583345.gitgitgadget@gmail.com>
* jc/history-message-prep-fix (2026-06-29) 1 commit
- history: streamline message preparation and plug file stream leak
Code clean-up with leakfix for a write file stream.
Will merge to 'next'?
cf. <akO1mhi2u2PntLbt@pks.im>
source: <xmqqmrwdxrat.fsf@gitster.g>
* ty/migrate-excludes-file (2026-06-30) 1 commit
- environment: move excludes_file into repo_config_values
Move excludes_file global variable into per-repository structure.
Needs review.
source: <20260630164401.2906091-2-cat@malon.dev>
* kk/merge-base-exhaustion (2026-07-01) 10 commits
. commit-reach: remove commit-date ordering fallback
. commit-reach: move min_generation check into paint_queue_get()
. commit-reach: terminate merge-base walk when one paint side is exhausted
. commit-reach: introduce struct paint_state with per-side counters
. t6600: add clock-skew topologies and step counts for edge cases
. commit-reach: add trace2 instrumentation to paint_down_to_common()
. t6099, t6600: add side-exhaustion regression tests
. t6600: add test cases for side-exhaustion edge cases
. test-lib-functions: improve diagnostic output for trace2 data assertions
. Documentation/technical: add paint-down-to-common doc
The merge-base computation has been optimized by stopping the walk
early when one side's exclusive commits in the queue are exhausted,
yielding significant speedups for queries with one-sided histories.
Needs review.
passes t6600 standalone, breaks when merged to 'seen'.
source: <pull.2149.v5.git.1782923832.gitgitgadget@gmail.com>
* dk/meson-enable-use-nsec-build (2026-06-20) 1 commit
- meson: wire up USE_NSEC build knob
The USE_NSEC build knob, which enables support for sub-second file
timestamp resolution, has been wired up to the Meson build system.
Waiting for response(s) to review comment(s).
cf. <ajjuoS5Qc3K0nCRl@pks.im>
cf. <akIL6oJgUv8J8SB2@pks.im>
source: <c4c5ade901ff95b0f95939ea818870e4f3d59da1.1781971201.git.ben.knoble+github@gmail.com>
* ps/connected-generic-promisor-checks (2026-06-25) 5 commits
(merged to 'next' on 2026-06-29 at 10eef65b98)
+ connected: search promisor objects generically
+ connected: split out promisor-based connectivity check
+ odb/source-packed: support flags when iterating an object prefix
+ odb/source-packed: extract logic to skip certain packs
+ Merge branch 'ps/odb-source-packed' into ps/connected-generic-promisor-checks
(this branch uses ps/odb-source-packed.)
The connectivity check has been refactored to search for promisor
objects in a generic way using the object database interface,
rather than iterating packfiles directly. This allows connectivity
checks to work properly in repositories that do not use packfiles.
Will merge to 'master'.
cf. <CAP8UFD07AzNtP3rRj4btYfFfakX0kkLXKpO9T=a3Mds3YWEsXw@mail.gmail.com>
source: <20260625-pks-connected-generic-promisor-checks-v3-0-7308f3b9dc44@pks.im>
* ps/libgit-in-subdir (2026-06-30) 3 commits
- Move libgit.a sources into separate "lib/" directory
- t/helper: prepare "test-example-tap.c" for introduction of "lib/"
- Merge branch 'ps/odb-source-packed' into ps/libgit-in-subdir
(this branch uses ps/odb-source-packed.)
The source files for libgit.a have been moved into a new "lib/"
directory to clean up the top-level directory and clearly separate
library code.
Waiting for response(s) to review comment(s).
cf. <cbbb08fc-fd4d-45ef-927b-05ac44602ff1@gmail.com>
source: <20260701-pks-libgit-in-subdir-v3-0-5e4860056094@pks.im>
* ps/odb-generalize-prepare (2026-06-22) 3 commits
- odb: introduce `odb_prepare()`
- odb/source: generalize `reprepare()` callback
- Merge branch 'ps/odb-source-packed' into ps/odb-generalize-prepare
(this branch uses ps/odb-source-packed.)
The `reprepare()` callback for object database sources has been
generalized into a `prepare()` callback with an optional flush cache
flag, and a new `odb_prepare()` wrapper has been introduced to
allow pre-opening object database sources.
Will merge to 'next'?
cf. <87ik704f1j.fsf@emacs.iotcl.com>
source: <20260622-b4-pks-odb-generalize-prepare-v1-0-d2a5c5d13144@pks.im>
* jc/submittingpatches-design-critiques (2026-06-20) 1 commit
(merged to 'next' on 2026-06-22 at 7495b5f9d6)
+ SubmittingPatches: address design critiques
The documentation in SubmittingPatches has been updated to clarify how
patch contributors should respond to design and viability critiques,
and how the resolution of such critiques should be recorded in the
final commit messages.
Will merge to 'master'.
cf. <ajjwYGWZ6hQWr600@pks.im>
source: <xmqqeci0g4mz.fsf@gitster.g>
* wy/doc-clarify-review-replies (2026-06-21) 2 commits
(merged to 'next' on 2026-06-29 at 21ae0599dc)
+ doc: advise batching patch rerolls
+ doc: encourage review replies before rerolling
Documentation on community contribution guidelines has been updated to
encourage replying to review comments before rerolling, and to advise
a default limit of at most one reroll per day to give reviewers across
different time zones enough time to participate.
Will merge to 'master'.
cf. <ajvDuUiDsmyf5LnX@pks.im>
source: <cover.1782028813.git.wy@wyuan.org>
* ty/migrate-ignorecase (2026-06-19) 2 commits
- config: use repo_ignore_case() to access core.ignorecase
- environment: move ignore_case into repo_config_values
The global configuration variable ignore_case (representing the
core.ignorecase configuration) has been migrated into struct
repo_config_values to tie it to a specific repository instance.
Waiting for comments from Johannes.
cf. <xmqqzf0mzc7j.fsf@gitster.g>
source: <20260619155152.642760-1-cat@malon.dev>
* mm/line-log-limited-ops (2026-06-27) 7 commits
- diffcore-pickaxe: scope -G to the -L tracked range
- diff: support --check with -L line ranges
- line-log: support diff stat formats with -L
- diff: extract a line-range diff helper for reuse
- diff: emit -L hunk headers via xdiff's formatter
- diff: simplify the line-range filter by classifying removals immediately
- diff: rename and group the line-range filter for clarity
"git log -L<range>:<path>" learned to limit various "diff" operations
like --stat, --check, -G, to the specified range:path.
Needs review.
source: <pull.2152.v2.git.1782581342.gitgitgadget@gmail.com>
* hn/history-squash (2026-06-28) 4 commits
- history: re-edit a squash with every message
- history: add squash subcommand to fold a range
- history: give commit_tree_ext a message template
- history: extract helper for a commit's parent tree
The experimental "git history" command has been taught a new
"squash" subcommand to fold a range of commits into a single commit,
replaying any descendants on top.
Waiting for response(s) to review comment(s).
cf. <xmqqse65zyhw.fsf@gitster.g>
cf. <akIQLM6xZTHBudWT@pks.im>
cf. <3b3af3ef-a043-4af9-964e-429237789c97@gmail.com>
source: <pull.2337.v6.git.git.1782635349.gitgitgadget@gmail.com>
* mh/fetch-follow-remote-head-config (2026-06-19) 8 commits
(merged to 'next' on 2026-06-22 at 423079e1c8)
+ fetch: fixup a misaligned comment
+ fetch: add configuration variable fetch.followRemoteHEAD
+ fetch: refactor do_fetch handling of followRemoteHEAD
+ fetch: return 0 on known git_fetch_config
+ fetch: rename function report_set_head
+ t5510: cleanup remote in followRemoteHEAD dangling ref test
+ doc: explain fetchRemoteHEADWarn advice
+ fetch: fixup set_head advice for warn-if-not-branch
The `fetch.followRemoteHEAD` configuration variable has been added to
provide a default for the per-remote `remote.<name>.followRemoteHEAD`
setting.
Will merge to 'master'.
cf. <xmqqcxxp1j2t.fsf@gitster.g>
source: <20260619094751.2996804-1-m@lfurio.us>
* ps/refs-writing-subcommands (2026-06-30) 5 commits
- builtin/refs: add "rename" subcommand
- builtin/refs: add "create" subcommand
- builtin/refs: add "update" subcommand
- builtin/refs: add "delete" subcommand
- builtin/refs: drop `the_repository`
The "git refs" toolbox has been extended with new "create", "delete",
"update", and "rename" subcommands to create, delete, update, and
rename references, respectively.
Will merge to 'next'?
cf. <xmqqcxx7susi.fsf@gitster.g>
source: <20260630-pks-refs-writing-subcommands-v3-0-deb04de1ecef@pks.im>
* po/hash-object-size-t (2026-06-16) 6 commits
(merged to 'next' on 2026-06-21 at b780a276b9)
+ hash-object: add a >4GB/LLP64 test case using filtered input
+ hash-object: add another >4GB/LLP64 test case
+ hash-object --stdin: verify that it works with >4GB/LLP64
+ hash algorithms: use size_t for section lengths
+ object-file.c: use size_t for header lengths
+ hash-object: demonstrate a >4GB/LLP64 problem
Support for hashing loose or packed objects larger than 4GB on Windows
and other LLP64 platforms has been improved by converting object header
buffers and data-handling functions from 'unsigned long' to 'size_t'.
Will merge to 'master'.
cf. <ajOQthRjhD3hRM9w@pks.im>
source: <pull.2138.v2.git.1781621398.gitgitgadget@gmail.com>
* kh/submittingpatches-trailers (2026-06-18) 5 commits
(merged to 'next' on 2026-06-22 at 2cd4a152c9)
+ SubmittingPatches: note that trailer order matters
+ SubmittingPatches: be consistent with trailer markup
+ SubmittingPatches: document Based-on-patch-by trailer
+ SubmittingPatches: discourage common Linux trailers
+ SubmittingPatches: encourage trailer use for substantial help
The trailer sections in SubmittingPatches have been updated to
encourage use of standard trailers.
Will merge to 'master'.
cf. <xmqq4ij0vo8f.fsf@gitster.g>
source: <V3_CV_SubPatches_trailers.9ec@msgid.xyz>
* mv/log-follow-mergy (2026-06-21) 1 commit
(merged to 'next' on 2026-06-22 at f7e984a003)
+ log: improve --follow following renames for non-linear history
"git log --follow" has been updated to handle non-linear history, in
which the path being tracked gets renamed differently in multiple
history lines, better.
Will merge to 'master'.
source: <ajjU4w2B0NlZffw1@collabora.com>
* wy/doc-myfirstcontribution-trim-quotes (2026-06-11) 1 commit
- MyFirstContribution: mention trimming quoted text in replies
The contributor guide has been updated to advise new contributors to
trim irrelevant quoted text when replying to review comments, matching
the existing advice given to reviewers.
Comments?
cf. <xmqqcxxwljue.fsf@gitster.g>
source: <080402ff0ac8127b654dccea59a1bf643df62a5c.1781186476.git.wy@wyuan.org>
* tb/midx-incremental-custom-base (2026-06-12) 3 commits
- midx-write: include packs above custom incremental base
- midx: pass custom '--base' through incremental writes
- t5334: expose shared `nth_line()` helper
The `git multi-pack-index write --incremental` command has been
corrected to properly honor the `--base` option. Previously, the
custom base was ignored by the normal write path, and the pack
exclusion logic incorrectly skipped packs from layers above the
selected base, breaking reachability closure for bitmaps.
Needs review.
source: <cover.1781294771.git.me@ttaylorr.com>
* mm/test-grep-lint (2026-06-12) 6 commits
- t: add greplint to detect bare grep assertions
- t: convert grep assertions to test_grep
- t: fix Lexer line count for $() inside double-quoted strings
- t: extract chainlint's parser into shared module
- t: fix grep assertions missing file arguments
- t/README: document test_grep helper
Waiting for response(s) to review comment(s).
cf. <aj93BE8MYatQAjoy@szeder.dev>
cf. <xmqqqzlpt543.fsf@gitster.g>
source: <pull.2135.v2.git.1781323575.gitgitgadget@gmail.com>
* rs/cat-file-default-format-optim (2026-06-14) 1 commit
(merged to 'next' on 2026-06-17 at 43ed8b3969)
+ cat-file: speed up default format
Will merge to 'master'.
cf. <20260615165326.GA91269@coredump.intra.peff.net>
source: <5a7ed929-6fe0-496c-83bd-65dee57c2241@web.de>
* kk/prio-queue-get-put-fusion (2026-06-08) 2 commits
- prio-queue: fold lazy_queue into prio_queue for automatic get+put fusion
- prio-queue: rename .nr to .nr_ and add accessor helpers
The lazy priority queue optimization pattern (deferring actual removal
in prio_queue_get() to allow get+put fusion) has been folded directly
into prio_queue itself, speeding up commit traversal workflows and
simplifying callers.
Will merge to 'next'?
cf. <xmqqh5mjrbgq.fsf@gitster.g>
source: <pull.2140.v4.git.1780945851.gitgitgadget@gmail.com>
* td/ref-filter-memoize-contains (2026-06-12) 3 commits
- commit-reach: die on contains walk errors
- ref-filter: memoize --contains with generations
- commit-reach: reject cycles in contains walk
'git branch --contains' and 'git for-each-ref --contains' have
been optimized to use the memoized commit traversal previously
used only by 'git tag --contains', significantly speeding up
connectivity checks across many candidate refs with shared
history.
Comments?
cf. <xmqqqzlpulkp.fsf@gitster.g>
source: <20260612-ref-filter-memoized-contains-v4-0-5ed39fd001dd@gmail.com>
* tc/replay-linearize (2026-06-25) 3 commits
- replay: offer an option to linearize the commit topology
- replay: better explain how pick_regular_commit() picks a base
- replay: add helper to put entry into mapped_commits
git replay learns --linearize option to drop merge commits and
linearize the replayed history, mimicking git rebase
--no-rebase-merges.
Waiting for response(s) to review comment(s).
cf. <xmqq5x358byf.fsf@gitster.g>
cf. <b5d70a0b-ef32-49c9-84ba-8a64b7809574@gmail.com>
cf. <f8b520d1-edeb-9e45-c503-025c8b5833c3@gmx.de>
cf. <akOpOXeD_gS5U7rH@pks.im>
source: <20260626-toon-git-replay-drop-merges-v5-0-5e120738b9d0@iotcl.com>
* ps/setup-drop-global-state (2026-06-10) 8 commits
(merged to 'next' on 2026-06-15 at d9a8b88d47)
+ treewide: drop USE_THE_REPOSITORY_VARIABLE
+ environment: stop using `the_repository` in `is_bare_repository()`
+ environment: split up concerns of `is_bare_repository_cfg`
+ builtin/init: stop modifying `is_bare_repository_cfg`
+ setup: remove global `git_work_tree_cfg` variable
+ builtin/init: simplify logic to configure worktree
+ builtin/init: stop modifying global `git_work_tree_cfg` variable
+ Merge branch 'ps/setup-centralize-odb-creation' into ps/setup-drop-global-state
(this branch is used by ps/setup-split-discovery-and-setup.)
Continuation of "setup.c" refactoring to drop remaining global state
(`git_work_tree_cfg`, `is_bare_repository_cfg`). The most notable
outcome is that `is_bare_repository()` has been updated to no longer
implicitly rely on `the_repository`.
Will merge to 'master'.
cf. <airVOrTboNDDGBak@denethor>
cf. <87ldckyygk.fsf@emacs.iotcl.com>
source: <20260611-b4-pks-setup-drop-global-state-v2-0-a6f7269c841d@pks.im>
* ps/refs-onbranch-fixes (2026-06-25) 12 commits
(merged to 'next' on 2026-06-29 at 7b4929e311)
+ refs: protect against chicken-and-egg recursion
+ refs/reftable: lazy-load configuration to fix chicken-and-egg
+ reftable: split up write options
+ refs/files: lazy-load configuration to fix chicken-and-egg
+ refs: move parsing of "core.logAllRefUpdates" back into ref stores
+ repository: free main reference database
+ chdir-notify: drop unused `chdir_notify_reparent()`
+ refs: unregister reference stores from "chdir_notify"
+ setup: don't apply "GIT_REFERENCE_BACKEND" without a repository
+ setup: stop applying repository format twice
+ setup: inline `check_and_apply_repository_format()`
+ Merge branch 'ps/setup-centralize-odb-creation' into ps/refs-onbranch-fixes
(this branch is used by ps/setup-split-discovery-and-setup.)
Reference backend configuration is now loaded lazily to avoid
recursive calls during repository initialization when "onbranch"
configuration conditions are evaluated. This also fixes a memory
leak and allows dropping the unused `chdir_notify_reparent()`
machinery.
Will merge to 'master'.
cf. <xmqqse6ae45i.fsf@gitster.g>
source: <20260625-b4-pks-refs-avoid-chdir-notify-reparent-v6-0-41fbca3cf5e3@pks.im>
* ps/odb-source-packed (2026-06-16) 18 commits
(merged to 'next' on 2026-06-19 at dcf0c084e4)
+ odb/source-packed: drop pointer to "files" parent source
+ midx: refactor interfaces to work on "packed" source
+ odb/source-packed: stub out remaining functions
+ odb/source-packed: wire up `freshen_object()` callback
+ odb/source-packed: wire up `find_abbrev_len()` callback
+ odb/source-packed: wire up `count_objects()` callback
+ odb/source-packed: wire up `for_each_object()` callback
+ odb/source-packed: wire up `read_object_stream()` callback
+ odb/source-packed: wire up `read_object_info()` callback
+ packfile: use higher-level interface to implement `has_object_pack()`
+ odb/source-packed: wire up `reprepare()` callback
+ odb/source-packed: wire up `close()` callback
+ odb/source-packed: start converting to a proper `struct odb_source`
+ odb/source-packed: store pointer to "files" instead of generic source
+ packfile: move packed source into "odb/" subsystem
+ packfile: split out packfile list logic
+ packfile: rename `struct packfile_store` to `odb_source_packed`
+ Merge branch 'ps/odb-source-loose' into ps/odb-source-packed
(this branch is used by ps/connected-generic-promisor-checks, ps/libgit-in-subdir, ps/odb-drop-whence and ps/odb-generalize-prepare.)
The packed object source has been refactored into a proper struct
odb_source.
Will merge to 'master'.
cf. <ajK2QKdW-TdflfR0@denethor>
source: <20260617-pks-odb-source-packed-v3-0-b5c7583cd795@pks.im>
* td/ref-filter-restore-prefix-iteration (2026-06-12) 1 commit
(merged to 'next' on 2026-06-19 at a19dbb4193)
+ ref-filter: restore prefix-scoped iteration
Commands that list branches and tags (like git branch and git tag)
have been optimized to pass the namespace prefix when initializing
their ref iterator, avoiding a loose-ref scaling regression in
repositories with many unrelated loose references.
Will merge to 'master'.
cf. <xmqqik7fsv2m.fsf@gitster.g>
source: <20260612-fix-git-branch-regression-v4-1-f150038c02f4@gmail.com>
* ty/move-protect-hfs-ntfs (2026-06-20) 2 commits
(merged to 'next' on 2026-06-20 at d8ca0d5180)
+ environment: use 'repo->initialized' for repo_protect_hfs() and repo_protect_ntfs()
(merged to 'next' on 2026-06-15 at c2a30ca954)
+ environment: move 'protect_hfs' and 'protect_ntfs' into 'repo_config_values'
The global configuration variables protect_hfs and protect_ntfs have
been migrated into struct repo_config_values to tie them to
per-repository configuration state.
Will merge to 'master'.
cf. <CAP8UFD35Tiy1_fqpjq8P-z=ZhzR3MTiThqfCs977652umRoSEQ@mail.gmail.com>
cf. <xmqqse6uwdnz.fsf@gitster.g>
source: <20260610124353.149874-2-cat@malon.dev>
source: <20260620140957.667820-1-cat@malon.dev>
* ps/cat-file-remote-object-info (2026-07-01) 13 commits
- cat-file: make remote-object-info allow-list dynamic
- cat-file: validate remote atoms with an allow-list
- cat-file: add remote-object-info to batch-command
- transport: add client support for object-info
- serve: advertise object-info feature
- fetch-pack: move fetch initialization
- connect: make `write_fetch_command_and_capabilities()` more generic
- fetch-pack: move `write_fetch_command_and_capabilities()` to connect.c
- fetch-pack: drop static `advertise_sid` variable
- t1006: split test utility functions into new 'lib-cat-file.sh'
- cat-file: declare loop counter inside for()
- git-compat-util: add `strtoumax_szt()` with error handling
- transport-helper: fix memory leak of helper on disconnect
The `remote-object-info` command has been added to `git cat-file
--batch-command`, allowing clients to request object metadata
(currently size) from a remote server via protocol v2 without
downloading the entire object.
The client dynamically filters format placeholders based on
server-advertised capabilities and safely returns empty strings for
inapplicable or unsupported fields.
Waiting for response(s) to review comment(s).
cf. <xmqq7bneo9mh.fsf@gitster.g>
source: <20260701-ps-eric-work-rebase-v15-0-c88a43b63917@gmail.com>
* ps/doc-recommend-b4 (2026-06-15) 3 commits
(merged to 'next' on 2026-06-17 at dd9a463369)
+ b4: introduce configuration for the Git project
+ MyFirstContribution: recommend the use of b4
+ MyFirstContribution: recommend shallow threading of cover letters
Project-specific configuration for b4 has been introduced, and the
documentation has been updated to recommend using it as a
streamlined method for submitting patches.
Will merge to 'master'.
cf. <87eci7yomp.fsf@emacs.iotcl.com>
source: <20260615-pks-b4-v4-0-22cfca8f19c5@pks.im>
* sn/rebase-update-refs-symrefs (2026-06-03) 1 commit
- rebase: skip branch symref aliases
"git rebase --update-refs" has been taught to resolve local branch
symrefs to their referents before queuing updates. This correctly
skips aliases of the current branch and avoids duplicate updates for
underlying real branches, fixing failures when branch aliases (like a
default branch rename) are present.
Waiting for response(s) to review comment(s).
cf. <f982c386-e329-4ab0-b695-e540bcb9de3d@gmail.com>
source: <pull.2126.v2.git.1780482436865.gitgitgadget@gmail.com>
* mm/diff-process-hunks (2026-06-14) 6 commits
- blame: consult diff process for no-hunk detection
- diff: bypass diff process with --no-ext-diff and in format-patch
- diff: add long-running diff process via diff.<driver>.process
- sub-process: separate process lifecycle from hashmap management
- userdiff: add diff.<driver>.process config
- xdiff: support external hunks via xpparam_t
A new `diff.<driver>.process` configuration has been introduced to
allow a long-running external process to act as a hunk provider to
allows external tools to control which lines Git considers changed
while leaving all output formatting (word diff, color, blame, etc.) to
Git's standard pipeline.
Expecting a reroll.
cf. <CAC2Qwm+P=fZOtpfMPeMiSXf3Afk6OLYpTP8Br78_PRA8WNL1Wg@mail.gmail.com>
source: <pull.2120.v4.git.1781463564.gitgitgadget@gmail.com>
* tb/pack-path-walk-bitmap-delta-islands (2026-06-21) 5 commits
(merged to 'next' on 2026-06-22 at 59cf1663e7)
+ pack-objects: support `--delta-islands` with `--path-walk`
+ pack-objects: extract `record_tree_depth()` helper
+ pack-objects: support reachability bitmaps with `--path-walk`
+ t/perf: drop p5311's lookup-table permutation
+ Merge branch 'ds/path-walk-filters' into tb/pack-path-walk-bitmap-delta-islands
The pack-objects command now supports using reachability bitmaps and
delta-islands concurrently with the `--path-walk` option, allowing
faster packaging by falling back to path-walk when bitmaps cannot
fully satisfy the request.
Will merge to 'master'.
cf. <xmqqwlvq1qyy.fsf@gitster.g>
source: <cover.1782082975.git.me@ttaylorr.com>
* ty/migrate-trust-executable-bit (2026-06-19) 3 commits
- environment: move trust_executable_bit into repo_config_values
- read-cache: move 'ce_mode_from_stat()' to 'read-cache.c'
- read-cache: remove redundant extern declarations
The 'trust_executable_bit' (coming from 'core.filemode'
configuration) has been migrated into 'repo_config_values' to tie it
to a specific repository instance.
Comments?
cf. <xmqqcxx9ukvw.fsf@gitster.g>
source: <20260619162105.648495-1-cat@malon.dev>
* kk/prio-queue-cascade-sift (2026-06-01) 1 commit
- prio-queue: use cascade-down for faster extract-min
prio_queue_get() has been optimized by using a cascade-down approach
(promoting the smaller child at each level and sifting up the last
element from the leaf vacancy), which halves the number of comparisons
per extract-min operation in the common case.
On hold, waiting for kk/prio-queue-get-put-fusion to land first.
cf. <CAL71e4MYNiScZjTwkApjDAjRh2LM0_SP59h5HCTywV-Pua03tw@mail.gmail.com>
source: <pull.2132.v2.git.1780301856444.gitgitgadget@gmail.com>
* jk/repo-info-path-keys (2026-06-23) 3 commits
(merged to 'next' on 2026-06-29 at fbf9652169)
+ repo: add path.gitdir with absolute and relative suffix formatting
+ repo: add path.commondir with absolute and relative suffix formatting
+ path: extract format_path() and use in rev-parse
(this branch is used by ps/setup-split-discovery-and-setup.)
The "git repo info" command has been taught new keys to output both
absolute and relative paths for "gitdir" and "commondir", supported by
a new path-formatting helper extracted from "git rev-parse".
Will merge to 'master'.
cf. <xmqqy0g3iz38.fsf@gitster.g>
source: <20260624033748.108281-1-jayatheerthkulkarni2005@gmail.com>
* ps/history-drop (2026-07-01) 11 commits
- builtin/history: implement "drop" subcommand
- builtin/history: split handling of ref updates into two phases
- replay: expose `replay_result_queue_update()`
- reset: stop assuming that the caller passes in a clean index
- reset: allow the caller to specify the current HEAD object
- reset: introduce ability to skip updating HEAD
- reset: introduce dry-run mode
- reset: modernize flags passed to `reset_working_tree()`
- reset: rename `reset_head()`
- reset: drop `USE_THE_REPOSITORY_VARIABLE`
- read-cache: split out function to drop unmerged entries to stage 0
The experimental "git history" command has been taught a new "drop"
subcommand to remove a commit and replay its descendants onto its
parent.
Needs review.
source: <20260701-b4-pks-history-drop-v8-0-19b5cdf1facd@pks.im>
* jk/setup-gitfile-diag-fix (2026-06-16) 1 commit
(merged to 'next' on 2026-06-18 at b63b3d1f25)
+ read_gitfile(): simplify NOT_A_REPO error message
A regression in the error diagnosis code for invalid .git files has
been fixed, avoiding a potential NULL-pointer crash when reporting
that a .git file does not point to a valid repository.
Will merge to 'master'.
cf. <xmqqjyry4hax.fsf@gitster.g>
source: <20260616123516.GA2301231@coredump.intra.peff.net>
* kh/doc-trailers (2026-06-10) 10 commits
- doc: interpret-trailers: document comment line treatment
- doc: interpret-trailers: commit to “trailer block” term
- doc: interpret-trailers: join new-trailers again
- doc: interpret-trailers: add key format example
- doc: interpret-trailers: explain key format
- doc: interpret-trailers: explain the format after the intro
- doc: interpret-trailers: not just for commit messages
- doc: interpret-trailers: use “metadata” in Name as well
- doc: interpret-trailers: replace “lines” with “metadata”
- doc: interpret-trailers: stop fixating on RFC 822
Documentation updates.
Expecting a reroll.
cf. <729baf6b-53ea-4e8d-95ab-5935667e66c2@app.fastmail.com>
source: <V3_CV_doc_int-tr_key_format.8a3@msgid.xyz>
* za/completion-hide-dotfiles (2026-06-20) 2 commits
- completion: hide dotfiles by default for path completion
- completion: hide dotfiles for selected path completion
The path completion for commands like `git rm` and `git mv`, is being
updated to hide dotfiles by default, unless the user explicitly starts
the path with a dot, matching standard shell-completion behavior.
Waiting for response(s) to review comment(s).
cf. <xmqqik71t3nr.fsf@gitster.g>
source: <pull.2311.v3.git.git.1781978156.gitgitgadget@gmail.com>
* ec/commit-fixup-options (2026-05-26) 2 commits
- commit: allow -c/-C for all kinds of --fixup
- commit: allow -m/-F for all kinds of --fixup
The -m/-F/-c/-C options to supply commit log message from outside the
editor are now supported for all "git commit --fixup" variations.
Needs review.
source: <cover.1779792311.git.erik@cervined.in>
* kh/doc-replay-config (2026-06-05) 4 commits
- doc: replay: move “default” to the right-hand side
- doc: replay: use a nested description list
- doc: replay: improve config description
- doc: link to config for git-replay(1)
Doc update for "git replay" to actually refer to its configuration
variables.
Needs review.
source: <V3_CV_doc_replay_config.780@msgid.xyz>
* hn/status-pull-advice-qualified (2026-05-21) 1 commit
(merged to 'next' on 2026-06-15 at 898a4df940)
+ remote: qualify "git pull" advice for non-upstream compareBranches
Advice shown by "git status" when the local branch is behind or has
diverged from its push branch has been updated to suggest "git pull
<remote> <branch>".
Will merge to 'master'.
cf. <xmqq7bo6xuok.fsf@gitster.g>
source: <pull.2301.v4.git.git.1779372367317.gitgitgadget@gmail.com>
* hn/branch-delete-merged (2026-06-24) 7 commits
- branch: add --dry-run for --delete-merged
- branch: add branch.<name>.deleteMerged opt-out
- branch: add --delete-merged <branch>
- branch: prepare delete_branches for a bulk caller
- branch: let delete_branches skip unmerged branches on bulk refusal
- branch: convert delete_branches() to a flags argument
- branch: add --forked filter for --list mode
"git branch" command learned "--delete-merged" option to remove
local branches that have already been merged to the remote-tracking
branches they track.
Needs review.
source: <pull.2285.v18.git.git.1782338106.gitgitgadget@gmail.com>
* cc/promisor-auto-config-url-more (2026-05-27) 8 commits
(merged to 'next' on 2026-06-15 at d1c99e75cc)
+ doc: promisor: improve acceptFromServer entry
+ promisor-remote: auto-configure unknown remotes
+ promisor-remote: trust known remotes matching acceptFromServerUrl
+ promisor-remote: introduce promisor.acceptFromServerUrl
+ promisor-remote: add 'local_name' to 'struct promisor_info'
+ urlmatch: add url_normalize_pattern() helper
+ urlmatch: change 'allow_globs' arg to bool
+ t5710: simplify 'mkdir X' followed by 'git -C X init'
The handling of promisor-remote protocol capability has been
loosened to allow the other side to add to the list of promisor
remotes via the promisor.acceptFromServerURL configuration
variable.
Will merge to 'master'.
cf. <877bo7294j.fsf@emacs.iotcl.com>
cf. <xmqqh5naxwfc.fsf@gitster.g>
source: <20260527140820.1438165-1-christian.couder@gmail.com>
* hn/checkout-track-fetch (2026-06-24) 2 commits
- checkout: extend --track with a "fetch" mode to refresh start-point
- branch: expose helpers for finding the remote owning a tracking ref
"git checkout --track=..." learned to optionally fetch the branch
from the remote the new branch will work with.
Waiting for response(s) to review comment(s).
cf. <12998c3a-ff69-4a98-9ed6-18aa0224e75e@gmail.com>
cf. <CAL71e4MiijEiM26TKJcOYT7L4pfQeMM_F2oT3U3igP-wOZm2Ag@mail.gmail.com>
source: <pull.2281.v15.git.git.1782338098.gitgitgadget@gmail.com>
* en/ort-harden-against-corrupt-trees (2026-06-13) 5 commits
(merged to 'next' on 2026-06-18 at e51bee59ca)
+ cache-tree: fix verify_cache() to catch non-adjacent D/F conflicts
+ merge-ort: abort merge when trees have duplicate entries
+ merge-ort: free diff pairs queue in clear_or_reinit_internal_opts()
+ merge-ort: drop unnecessary show_all_errors from collect_merge_info()
+ merge-ort: propagate callback errors from traverse_trees_wrapper()
"ort" merge backend handles merging corrupt trees better by
aborting when it should.
Will merge to 'master'.
cf. <xmqq5x3ldu4h.fsf@gitster.g>
source: <pull.2096.v2.git.1781419047.gitgitgadget@gmail.com>
* pw/status-rebase-todo (2026-06-23) 2 commits
(merged to 'next' on 2026-06-23 at a0fcde09dc)
+ status: improve rebase todo list parsing
+ sequencer: factor out parsing of todo commands
The display of the rebase todo list in "git status" has been
improved to correctly abbreviate object IDs for more commands and
avoid misinterpreting refs as object IDs.
Will merge to 'master'.
source: <cover.1782230024.git.phillip.wood@dunelm.org.uk>
* ps/shift-root-in-graph (2026-06-20) 3 commits
- graph: indent visual root in graph
- revision: add peek functions for lookahead
- lib-log-graph: move check_graph function
"git log --graph" has been modified to visually distinguish
parentless "root" commits (and commits that become roots due to
history simplification) by indenting them, preventing them from
appearing falsely related to unrelated commits rendered immediately
above them.
Expecting a reroll.
The peek-ahead approach may need to be scratched.
cf. <CAN5EUNSj-2hkEBF7N_M6RLsuujDNFNUF3w53zR7SN1_5i2BRyg@mail.gmail.com>
cf. <CAL71e4OQ_kGb+UwHgikHG236-8BVtc7P9OdpV4i4UzYRCoPczw@mail.gmail.com>
cf. <CAN5EUNTQV68_eofa7BGb0BukMe=U2d4-FEVmJwW4dObQ2r6LuA@mail.gmail.com>
source: <20260620-ps-pre-commit-indent-v6-0-cdc6d8fd5fbc@gmail.com>
^ permalink raw reply
* Re: [PATCH v2 1/4] t1517: skip svn tests if svn is not installed
From: Junio C Hamano @ 2026-07-01 22:27 UTC (permalink / raw)
To: brian m. carlson; +Cc: git, Jeff King
In-Reply-To: <20260701212442.1430084-2-sandals@crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
> +test_lazy_prereq SVN '
> + test_have_prereq PERL && test -n "$NO_SVN_TESTS" && perl -w -e "
> + use SVN::Core;
> + use SVN::Repos;
> + \$SVN::Core::VERSION gt '1.1.0' or exit(42);
> + "
> +'
If "have_prereq PERL" is not satisfied, SVN is not satisfied.
If NO_SVN_TESTS is an empty string (or unset), "test -n" fails, and
SVN is not satisfied. Questionable---am I misreading this part of
the logic???
The perl script would not barf only if use SVN::* succeed and then
SVN::Core::VERSION is strictly better than '1.1.0'. If not, i.e.,
libsvn-perl is not available, or its version is older, then we fail
with exit(42), and SVN is not satisfied.
> test_expect_success 'set up a non-repo directory and test file' '
> GIT_CEILING_DIRECTORIES=$(pwd) &&
> export GIT_CEILING_DIRECTORIES &&
> @@ -138,6 +146,8 @@ do
> case "$cmd" in
> instaweb)
> prereq=PERL ;;
> + svn)
> + prereq=SVN ;;
> *)
> prereq= ;;
> esac
^ permalink raw reply
* Re: [PATCH v2 3/4] rev-parse: have --parseopt callers exit 0 on --help
From: Junio C Hamano @ 2026-07-01 22:16 UTC (permalink / raw)
To: brian m. carlson; +Cc: git, Jeff King
In-Reply-To: <20260701212442.1430084-4-sandals@crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
> The usual invocation recommended by the manual page is this:
>
> eval "$(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)"
>
> Thus, the fact that git rev-parse --parseopt still exits 129 in this
> case is irrelevant, since the "echo exit $?" will print "exit 129", but
> that will be after the "exit 0" printed by Git—and thus ignored, since
> the shell will have already exited successfully.
Yuck, but ...
> if (!err && ctx && ctx->flags & PARSE_OPT_SHELL_EVAL)
> - fputs("EOF\n", outfile);
> + fputs("EOF\nexit 0\n", outfile);
... it does its job ;-).
^ permalink raw reply
* Re: [PATCH v2 1/4] t1517: skip svn tests if svn is not installed
From: Junio C Hamano @ 2026-07-01 22:10 UTC (permalink / raw)
To: brian m. carlson; +Cc: git, Jeff King
In-Reply-To: <20260701212442.1430084-2-sandals@crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
> The svn tests currently assume that git-svn's option parsing will always
> fail the tests because it exits 0 on --help, not 129. However, in a
> future commit, we'll expect it to exit 0 and the tests will then need to
> be updated to succeed in some cases and fail in others.
>
> We therefore need to have t1517 determine whether the Subversion Perl
> modules are present, since if they are not, git-svn will die on start
> and then it needs to continue to expect failure. Add a stripped down
> version of the tests in t/lib-git-svn.sh as a prerequisite we can use
> here for our svn tests.
>
> Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
> ---
> t/t1517-outside-repo.sh | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
> index c557f2f55c..583784f21b 100755
> --- a/t/t1517-outside-repo.sh
> +++ b/t/t1517-outside-repo.sh
> @@ -4,6 +4,14 @@ test_description='check random commands outside repo'
>
> . ./test-lib.sh
>
> +test_lazy_prereq SVN '
> + test_have_prereq PERL && test -n "$NO_SVN_TESTS" && perl -w -e "
> + use SVN::Core;
> + use SVN::Repos;
> + \$SVN::Core::VERSION gt '1.1.0' or exit(42);
> + "
> +'
This corresponds to 42 in t/lib-git-svn.sh? We can use any non-zero
value here, but just being curious.
> test_expect_success 'set up a non-repo directory and test file' '
> GIT_CEILING_DIRECTORIES=$(pwd) &&
> export GIT_CEILING_DIRECTORIES &&
> @@ -138,6 +146,8 @@ do
> case "$cmd" in
> instaweb)
> prereq=PERL ;;
> + svn)
> + prereq=SVN ;;
> *)
> prereq= ;;
> esac
^ permalink raw reply
* Re: [PATCH v2 0/4] rev-parse: exit 0 on --help
From: Junio C Hamano @ 2026-07-01 22:06 UTC (permalink / raw)
To: brian m. carlson; +Cc: git, Jeff King
In-Reply-To: <20260701212442.1430084-1-sandals@crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
> The standard philosophy for Unix software when a help option (such as
> --help) is specified is that the software should exit 0, printing the
> help output to standard output, since the standard output is for
> user-requested output and the program performed the requested task
> successfully. If the user specifies an incorrect option, then the help
> output should be printed to standard error (since the user has made a
> mistake) and it should exit unsuccessfully.
Hmph.
> git rev-parse --parseopt properly directs the output in both of these
> cases, but it currently exits 129 when it receives a --help or -h option
> on the command line, which causes its invoking script to do the same.
> This is not in line with the usual behavior and it causes scripts using
> this command to exit unsuccessfully on --help as well.
>
> This series introduces some changes to distinguish the --help and -h
> options from other cases in which we print help output and adjusts the
> exit code to 0 from those two options. We continue to exit 129 when the
> options are invalid, which is useful information to have for callers.
> We also make the relevant changes such that `git rev-parse --parseopt`
> does the same thing as long as it is invoked in the way specified in the
> manual page (which a quick GitHub search shows almost everyone does).
>
> One of the patches is rather long because we have many cases in which
> we've hard-coded exit code 129 into our tests. However, the changes
> there should not be complex, only somewhat tedious to review.
It is borderline for "yes, we all know it is obvious that things
should have worked this way from day one, we regret that it is not
the case, but it has been working differently and users' scripts all
have been working with the current behaviour, and it is likely that
they will all break".
Two big things that make it much less likely, saving grace, are that
this is only about "--help" (which is unlikely to be a part of
end-user script), and this makes the invocation succeed (if we were
changing from exit 0 to exit 129, we would be breaking tons more).
;-)
^ permalink raw reply
* [PATCH v2] Makefile: link osxkeychain & support universal Rust
From: Shardul Natu via GitGitGadget @ 2026-07-01 22:01 UTC (permalink / raw)
To: git; +Cc: Kristoffer Haugsbakk, Shnatu, Koji Nakamaru, Shnatu
In-Reply-To: <pull.2288.git.git.1778001976709.gitgitgadget@gmail.com>
From: Shnatu <snatu@google.com>
When Rust is enabled, ensure that the git-credential-osxkeychain
helper is linked with the necessary Rust libraries.
Also, introduce native support for macOS Universal Binaries
(multi-architecture builds) in the Git build system by allowing
the user to specify a list of target triples in the RUST_TARGETS
environment variable.
To implement this cleanly without complex shell scripting in recipes:
1. We introduce a declarative Make pattern rule (target/%/...) to
compile each target-specific library slice (e.g.,
target/aarch64-apple-darwin/...).
2. We update the $(RUST_LIB) recipe to depend on the list of
compiled target-specific member libraries ($(RUST_MEMBER_LIBS)).
3. On macOS, if multiple targets are specified, we use lipo to
combine them into a single Universal static library at
target/release/libgitcore.a.
4. If only one target is specified, we copy it to the standard
path.
5. We enforce that building for multiple targets requires macOS
(as lipo is only available there), raising a clear make error
on other platforms.
This is a highly elegant and native Makefile solution that avoids
complex shell scripting in recipes and fully supports macOS Universal
Binaries.
Signed-off-by: Shardul Natu <snatu@google.com>
---
Makefile: link osxkeychain helper against Rust
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2288%2Fkiranani%2Fnext-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2288/kiranani/next-v2
Pull-Request: https://github.com/git/git/pull/2288
Range-diff vs v1:
1: 57046d2f78 ! 1: 6a11aff909 Makefile: link osxkeychain helper against Rust
@@ Metadata
Author: Shnatu <snatu@google.com>
## Commit message ##
- Makefile: link osxkeychain helper against Rust
+ Makefile: link osxkeychain & support universal Rust
When Rust is enabled, ensure that the git-credential-osxkeychain
helper is linked with the necessary Rust libraries.
- Introduce the RUST_LIBS variable inside ifndef NO_RUST block
- to hold the Rust library dependency, and use it in the helper's
- build target. This cleanly handles cases where Rust is disabled,
- making it a no-op and avoiding any build failures on systems
- without Cargo.
+ Also, introduce native support for macOS Universal Binaries
+ (multi-architecture builds) in the Git build system by allowing
+ the user to specify a list of target triples in the RUST_TARGETS
+ environment variable.
- This addresses reviewer feedback from internal CL 910223487
- by simplifying the variables and avoiding confusing "LINK"
- terminology.
+ To implement this cleanly without complex shell scripting in recipes:
+ 1. We introduce a declarative Make pattern rule (target/%/...) to
+ compile each target-specific library slice (e.g.,
+ target/aarch64-apple-darwin/...).
+ 2. We update the $(RUST_LIB) recipe to depend on the list of
+ compiled target-specific member libraries ($(RUST_MEMBER_LIBS)).
+ 3. On macOS, if multiple targets are specified, we use lipo to
+ combine them into a single Universal static library at
+ target/release/libgitcore.a.
+ 4. If only one target is specified, we copy it to the standard
+ path.
+ 5. We enforce that building for multiple targets requires macOS
+ (as lipo is only available there), raising a clear make error
+ on other platforms.
- Signed-off-by: Shnatu <snatu@google.com>
+ This is a highly elegant and native Makefile solution that avoids
+ complex shell scripting in recipes and fully supports macOS Universal
+ Binaries.
+
+ Signed-off-by: Shardul Natu <snatu@google.com>
## Makefile ##
-@@ Makefile: ALL_LDFLAGS = $(LDFLAGS) $(LDFLAGS_APPEND)
- ifndef NO_RUST
- BASIC_CFLAGS += -DWITH_RUST
- GITLIBS += $(RUST_LIB)
-+RUST_LIBS = $(RUST_LIB)
+@@ Makefile: include shared.mak
+ #
+ # Building Rust code requires Cargo.
+ #
++# Define RUST_TARGETS if you want to cross-compile. If left unspecified, it uses
++# the default rust target on the system.
++#
++# On macOS, this supports specifying multiple targets, separated by a space.
++# This will produce a Universal static library using `lipo`.
++#
++# Example: RUST_TARGETS="aarch64-apple-darwin x86_64-apple-darwin"
++#
+ # == SHA-1 and SHA-256 defines ==
+ #
+ # === SHA-1 backend ===
+@@ Makefile: TEST_SHELL_PATH = $(SHELL_PATH)
+
+ LIB_FILE = libgit.a
+
++ifndef NO_RUST
+ ifdef DEBUG
+-RUST_TARGET_DIR = target/debug
++RUST_BUILD_CONFIG = debug
+ else
+-RUST_TARGET_DIR = target/release
++RUST_BUILD_CONFIG = release
+ endif
+
ifeq ($(uname_S),Windows)
- EXTLIBS += -luserenv
+-RUST_LIB = $(RUST_TARGET_DIR)/gitcore.lib
++RUST_LIB_NAME = gitcore.lib
+ else
+-RUST_LIB = $(RUST_TARGET_DIR)/libgitcore.a
++RUST_LIB_NAME = libgitcore.a
++endif
++RUST_LIB = target/$(RUST_BUILD_CONFIG)/$(RUST_LIB_NAME)
endif
+
+ GITLIBS = common-main.o $(LIB_FILE)
+@@ Makefile: scalar$X: scalar.o GIT-LDFLAGS $(GITLIBS)
+ $(LIB_FILE): $(LIB_OBJS)
+ $(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
+
++ifndef NO_RUST
++ifeq ($(RUST_TARGETS),)
+ $(RUST_LIB): Cargo.toml $(RUST_SOURCES) $(LIB_FILE)
+ $(QUIET_CARGO)cargo build $(CARGO_ARGS)
++else
++ifneq ($(words $(RUST_TARGETS)),1)
++ifneq ($(uname_S),Darwin)
++$(error Building universal Rust libraries requires macOS (lipo is not available on $(uname_S)))
++endif
++endif
++
++RUST_MEMBER_LIBS = $(foreach target,$(RUST_TARGETS),target/$(target)/$(RUST_BUILD_CONFIG)/$(RUST_LIB_NAME))
++$(RUST_MEMBER_LIBS): target/%/$(RUST_BUILD_CONFIG)/$(RUST_LIB_NAME): Cargo.toml $(RUST_SOURCES) $(LIB_FILE)
++ $(QUIET_CARGO)cargo build $(CARGO_ARGS) --target $*
++
++$(RUST_LIB): $(RUST_MEMBER_LIBS)
++ $(QUIET_GEN)\
++ if [ $(words $(RUST_TARGETS)) -gt 1 ]; then \
++ lipo -create $^ -output $@; \
++ else \
++ cp $< $@; \
++ fi
++endif
+
+ .PHONY: rust
+ rust: $(RUST_LIB)
++endif
+
+ export DEFAULT_EDITOR DEFAULT_PAGER
+
@@ Makefile: $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)
contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)
$(AR) $(ARFLAGS) $@ $^
-contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) GIT-LDFLAGS
-+contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) $(RUST_LIBS) GIT-LDFLAGS
++# When Rust is enabled, git-credential-osxkeychain depends on Rust symbols in $(RUST_LIB)
++contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) $(RUST_LIB) GIT-LDFLAGS
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
-- $(filter %.o,$^) $(LIB_FILE) $(EXTLIBS) -framework Security -framework CoreFoundation
-+ $(filter %.o,$^) $(LIB_FILE) $(RUST_LIBS) $(EXTLIBS) -framework Security -framework CoreFoundation
+ $(filter %.o,$^) $(LIBS) -framework Security -framework CoreFoundation
- contrib/credential/osxkeychain/git-credential-osxkeychain.o: contrib/credential/osxkeychain/git-credential-osxkeychain.c GIT-CFLAGS
- $(QUIET_LINK)$(CC) -o $@ -c $(dep_args) $(compdb_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $<
Makefile | 44 +++++++++++++++++++++++++++++++++++++++-----
1 file changed, 39 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 1f3f099f5c..8d49ecc897 100644
--- a/Makefile
+++ b/Makefile
@@ -500,6 +500,14 @@ include shared.mak
#
# Building Rust code requires Cargo.
#
+# Define RUST_TARGETS if you want to cross-compile. If left unspecified, it uses
+# the default rust target on the system.
+#
+# On macOS, this supports specifying multiple targets, separated by a space.
+# This will produce a Universal static library using `lipo`.
+#
+# Example: RUST_TARGETS="aarch64-apple-darwin x86_64-apple-darwin"
+#
# == SHA-1 and SHA-256 defines ==
#
# === SHA-1 backend ===
@@ -939,16 +947,19 @@ TEST_SHELL_PATH = $(SHELL_PATH)
LIB_FILE = libgit.a
+ifndef NO_RUST
ifdef DEBUG
-RUST_TARGET_DIR = target/debug
+RUST_BUILD_CONFIG = debug
else
-RUST_TARGET_DIR = target/release
+RUST_BUILD_CONFIG = release
endif
ifeq ($(uname_S),Windows)
-RUST_LIB = $(RUST_TARGET_DIR)/gitcore.lib
+RUST_LIB_NAME = gitcore.lib
else
-RUST_LIB = $(RUST_TARGET_DIR)/libgitcore.a
+RUST_LIB_NAME = libgitcore.a
+endif
+RUST_LIB = target/$(RUST_BUILD_CONFIG)/$(RUST_LIB_NAME)
endif
GITLIBS = common-main.o $(LIB_FILE)
@@ -3019,11 +3030,33 @@ scalar$X: scalar.o GIT-LDFLAGS $(GITLIBS)
$(LIB_FILE): $(LIB_OBJS)
$(QUIET_AR)$(RM) $@ && $(AR) $(ARFLAGS) $@ $^
+ifndef NO_RUST
+ifeq ($(RUST_TARGETS),)
$(RUST_LIB): Cargo.toml $(RUST_SOURCES) $(LIB_FILE)
$(QUIET_CARGO)cargo build $(CARGO_ARGS)
+else
+ifneq ($(words $(RUST_TARGETS)),1)
+ifneq ($(uname_S),Darwin)
+$(error Building universal Rust libraries requires macOS (lipo is not available on $(uname_S)))
+endif
+endif
+
+RUST_MEMBER_LIBS = $(foreach target,$(RUST_TARGETS),target/$(target)/$(RUST_BUILD_CONFIG)/$(RUST_LIB_NAME))
+$(RUST_MEMBER_LIBS): target/%/$(RUST_BUILD_CONFIG)/$(RUST_LIB_NAME): Cargo.toml $(RUST_SOURCES) $(LIB_FILE)
+ $(QUIET_CARGO)cargo build $(CARGO_ARGS) --target $*
+
+$(RUST_LIB): $(RUST_MEMBER_LIBS)
+ $(QUIET_GEN)\
+ if [ $(words $(RUST_TARGETS)) -gt 1 ]; then \
+ lipo -create $^ -output $@; \
+ else \
+ cp $< $@; \
+ fi
+endif
.PHONY: rust
rust: $(RUST_LIB)
+endif
export DEFAULT_EDITOR DEFAULT_PAGER
@@ -4074,7 +4107,8 @@ $(LIBGIT_HIDDEN_EXPORT): $(LIBGIT_PARTIAL_EXPORT)
contrib/libgit-sys/libgitpub.a: $(LIBGIT_HIDDEN_EXPORT)
$(AR) $(ARFLAGS) $@ $^
-contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) GIT-LDFLAGS
+# When Rust is enabled, git-credential-osxkeychain depends on Rust symbols in $(RUST_LIB)
+contrib/credential/osxkeychain/git-credential-osxkeychain: contrib/credential/osxkeychain/git-credential-osxkeychain.o $(LIB_FILE) $(RUST_LIB) GIT-LDFLAGS
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) \
$(filter %.o,$^) $(LIBS) -framework Security -framework CoreFoundation
base-commit: 43192e7977f5f05138abcdb3212a3f87ab513bef
--
gitgitgadget
^ permalink raw reply related
* RE: Security Vulnerability in Git 2.54.0/OpenSSL 3.5.6 Status
From: Person, Tim @ 2026-07-01 21:39 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git@vger.kernel.org
In-Reply-To: <fe8a3a3f-d762-d2c2-9454-a57ac9a75331@gmx.de>
Johannes,
Thank you for the reply. I wasn't sure who to reach out to for this question. I really appreciate the response and the insight related to your process and timing.
Thank you and have a great rest of your day.
Thanks,
Tim
-----Original Message-----
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Sent: Monday, June 29, 2026 6:57 AM
To: Person, Tim <Tim.Person@personent.com>
Cc: git@vger.kernel.org
Subject: Re: Security Vulnerability in Git 2.54.0/OpenSSL 3.5.6 Status
[You don't often get email from johannes.schindelin@gmx.de. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
[CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.]
Hi Tim,
On Sat, 27 Jun 2026, Person, Tim wrote:
> I am writing to determine when Git plans to release an update
> installer to patch the security vulnerability in Git 2.54.0 because of
> the included OpenSSL executable. This vulnerability is rated
> "Critical" in the CVE
> (https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww
> .cve.org%2FCVERecord%3Fid%3DCVE-2026-34182&data=05%7C02%7CTim.Person%4
> 0personentcloud.mail.onmicrosoft.com%7Cd04161ef041e4b2492fe08ded5e65ef7%7Ce2de18dc8323462e8c47561025ebc66c%7C0%7C0%7C639183382582991445%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=0dAHZbln7dV%2BrqdlWcsEGfDvkY5k0L%2Fon0NExDAIGzo%3D&reserved=0). An updated version of the OpenSSL.exe fixing this problem has been available since 06/12/2026. I am just wondering if/when you plan to address this major security issue.
OpenSSL.exe is not part of the critical path of Git for Windows. It is merely included as a curiosity for historical reasons. The critical CVE you mentioned does not affect anything in Git itself. Therefore, I did not even consider making an out-of-band release of Git for Windows merely for that OpenSSL v3.5.7 update.
The next Git for Windows release (v2.55.0, likely due later today, may slip to tomorrow) will include OpenSSL v3.5.7.
Ciao,
Johannes
^ permalink raw reply
* [PATCH v2 2/4] parse-options: add a separate case for help output on error
From: brian m. carlson @ 2026-07-01 21:24 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jeff King
In-Reply-To: <20260701212442.1430084-1-sandals@crustytoothpaste.net>
When we parse a command line option such as -h or --help, we currently
exit 129, since that is the exit code when help output is printed. In a
future commit, we'll change this to exit 0 instead, since we're doing
what the user wanted successfully.
However, there are some cases where we print help output because the
user has provided ambiguous or invalid input, such as an ambiguous
option, and we'll want to exit unsuccessfully there. Make this easier
by defining a new return code, PARSE_OPT_HELP_ERROR, that can be used in
this case, while reserving PARSE_OPT_HELP for those cases where the user
has requested help directly.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
builtin/blame.c | 1 +
builtin/shortlog.c | 1 +
builtin/update-index.c | 1 +
parse-options.c | 7 ++++++-
parse-options.h | 3 ++-
5 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/builtin/blame.c b/builtin/blame.c
index ffbd3ce5c5..65d43c7d48 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -1013,6 +1013,7 @@ int cmd_blame(int argc,
case PARSE_OPT_UNKNOWN:
break;
case PARSE_OPT_HELP:
+ case PARSE_OPT_HELP_ERROR:
case PARSE_OPT_ERROR:
case PARSE_OPT_SUBCOMMAND:
exit(129);
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index 6b2a0b93b5..cd262bd376 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -433,6 +433,7 @@ int cmd_shortlog(int argc,
case PARSE_OPT_UNKNOWN:
break;
case PARSE_OPT_HELP:
+ case PARSE_OPT_HELP_ERROR:
case PARSE_OPT_ERROR:
case PARSE_OPT_SUBCOMMAND:
exit(129);
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 3d6646c318..ac4610ec94 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -1133,6 +1133,7 @@ int cmd_update_index(int argc,
break;
switch (parseopt_state) {
case PARSE_OPT_HELP:
+ case PARSE_OPT_HELP_ERROR:
case PARSE_OPT_ERROR:
exit(129);
case PARSE_OPT_COMPLETE:
diff --git a/parse-options.c b/parse-options.c
index f4647e0099..a623961800 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -583,7 +583,7 @@ static enum parse_opt_result parse_long_opt(
ambiguous.option->long_name,
(abbrev.flags & OPT_UNSET) ? "no-" : "",
abbrev.option->long_name);
- return PARSE_OPT_HELP;
+ return PARSE_OPT_HELP_ERROR;
}
if (abbrev.option) {
if (*arg_end)
@@ -1037,6 +1037,7 @@ enum parse_opt_result parse_options_step(struct parse_opt_ctx_t *ctx,
usage_with_options(usagestr, options);
case PARSE_OPT_COMPLETE:
case PARSE_OPT_HELP:
+ case PARSE_OPT_HELP_ERROR:
case PARSE_OPT_ERROR:
case PARSE_OPT_DONE:
case PARSE_OPT_NON_OPTION:
@@ -1072,6 +1073,7 @@ enum parse_opt_result parse_options_step(struct parse_opt_ctx_t *ctx,
case PARSE_OPT_NON_OPTION:
case PARSE_OPT_SUBCOMMAND:
case PARSE_OPT_HELP:
+ case PARSE_OPT_HELP_ERROR:
case PARSE_OPT_COMPLETE:
BUG("parse_short_opt() cannot return these");
case PARSE_OPT_DONE:
@@ -1099,6 +1101,7 @@ enum parse_opt_result parse_options_step(struct parse_opt_ctx_t *ctx,
case PARSE_OPT_SUBCOMMAND:
case PARSE_OPT_COMPLETE:
case PARSE_OPT_HELP:
+ case PARSE_OPT_HELP_ERROR:
BUG("parse_short_opt() cannot return these");
case PARSE_OPT_DONE:
break;
@@ -1132,6 +1135,7 @@ enum parse_opt_result parse_options_step(struct parse_opt_ctx_t *ctx,
case PARSE_OPT_UNKNOWN:
goto unknown;
case PARSE_OPT_HELP:
+ case PARSE_OPT_HELP_ERROR:
goto show_usage;
case PARSE_OPT_NON_OPTION:
case PARSE_OPT_SUBCOMMAND:
@@ -1197,6 +1201,7 @@ int parse_options(int argc, const char **argv,
parse_options_start_1(&ctx, argc, argv, prefix, options, flags);
switch (parse_options_step(&ctx, options, usagestr)) {
case PARSE_OPT_HELP:
+ case PARSE_OPT_HELP_ERROR:
case PARSE_OPT_ERROR:
exit(129);
case PARSE_OPT_COMPLETE:
diff --git a/parse-options.h b/parse-options.h
index 0d1f738f8d..3ec8ba5cc8 100644
--- a/parse-options.h
+++ b/parse-options.h
@@ -57,7 +57,8 @@ enum parse_opt_option_flags {
};
enum parse_opt_result {
- PARSE_OPT_COMPLETE = -3,
+ PARSE_OPT_COMPLETE = -4,
+ PARSE_OPT_HELP_ERROR = -3,
PARSE_OPT_HELP = -2,
PARSE_OPT_ERROR = -1, /* must be the same as error() */
PARSE_OPT_DONE = 0, /* fixed so that "return 0" works */
^ permalink raw reply related
* [PATCH v2 4/4] parse-options: exit 0 on -h
From: brian m. carlson @ 2026-07-01 21:24 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jeff King
In-Reply-To: <20260701212442.1430084-1-sandals@crustytoothpaste.net>
The standard philosophy for Unix software when a help option (such as
--help) is specified is that the software should exit 0, printing the
help output to standard output, since the standard output is for
user-requested output and the program performed the requested task
successfully. If the user specifies an incorrect option, then the help
output should be printed to standard error (since the user has made a
mistake) and it should exit unsuccessfully.
Most of our commands currently exit 129 on receiving the -h option to
print the short help, which does not line up with the standard
philosophy above. Let's change that to exit 0 instead.
This requires changes to a variety of tests which previously wanted the
129 exit code, so update them. Note that because git diff does its own
option parsing, it still exits with 129, so update some of the tests to
expect either exit status.
Some commands also now pass with -h but not --help-all, so handle those
cases differently for those commands.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
builtin/blame.c | 1 +
builtin/shortlog.c | 1 +
builtin/update-index.c | 1 +
contrib/subtree/t/t7900-subtree.sh | 2 +-
parse-options.c | 13 +++++++---
t/for-each-ref-tests.sh | 2 +-
t/t0012-help.sh | 2 +-
t/t0040-parse-options.sh | 2 +-
t/t0450-txt-doc-vs-help.sh | 2 +-
t/t0610-reftable-basics.sh | 4 +--
t/t1403-show-ref.sh | 2 +-
t/t1410-reflog.sh | 4 +--
t/t1418-reflog-exists.sh | 2 +-
t/t1502-rev-parse-parseopt.sh | 14 +++++------
t/t1517-outside-repo.sh | 39 ++++++++++++++++++------------
t/t1800-hook.sh | 4 +--
t/t1900-repo-info.sh | 2 +-
t/t1901-repo-structure.sh | 2 +-
t/t2006-checkout-index-basic.sh | 6 ++---
t/t2107-update-index-basic.sh | 2 +-
t/t3004-ls-files-basic.sh | 6 ++---
t/t3200-branch.sh | 2 +-
t/t3903-stash.sh | 4 +--
t/t4200-rerere.sh | 2 +-
t/t5200-update-server-info.sh | 2 +-
t/t5304-prune.sh | 2 +-
t/t5400-send-pack.sh | 4 +--
t/t5512-ls-remote.sh | 2 +-
t/t6300-for-each-ref.sh | 4 +--
t/t6500-gc.sh | 2 +-
t/t7030-verify-tag.sh | 4 +--
t/t7508-status.sh | 4 +--
t/t7510-signed-commit.sh | 4 +--
t/t7600-merge.sh | 2 +-
t/t7800-difftool.sh | 3 +--
t/t7900-maintenance.sh | 2 +-
usage.c | 2 +-
37 files changed, 86 insertions(+), 72 deletions(-)
diff --git a/builtin/blame.c b/builtin/blame.c
index 65d43c7d48..38749f79c2 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -1013,6 +1013,7 @@ int cmd_blame(int argc,
case PARSE_OPT_UNKNOWN:
break;
case PARSE_OPT_HELP:
+ exit(0);
case PARSE_OPT_HELP_ERROR:
case PARSE_OPT_ERROR:
case PARSE_OPT_SUBCOMMAND:
diff --git a/builtin/shortlog.c b/builtin/shortlog.c
index cd262bd376..4c78d2e5ba 100644
--- a/builtin/shortlog.c
+++ b/builtin/shortlog.c
@@ -433,6 +433,7 @@ int cmd_shortlog(int argc,
case PARSE_OPT_UNKNOWN:
break;
case PARSE_OPT_HELP:
+ exit(0);
case PARSE_OPT_HELP_ERROR:
case PARSE_OPT_ERROR:
case PARSE_OPT_SUBCOMMAND:
diff --git a/builtin/update-index.c b/builtin/update-index.c
index ac4610ec94..6810327209 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -1133,6 +1133,7 @@ int cmd_update_index(int argc,
break;
switch (parseopt_state) {
case PARSE_OPT_HELP:
+ exit(0);
case PARSE_OPT_HELP_ERROR:
case PARSE_OPT_ERROR:
exit(129);
diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-subtree.sh
index 4194687cfb..c10f283b38 100755
--- a/contrib/subtree/t/t7900-subtree.sh
+++ b/contrib/subtree/t/t7900-subtree.sh
@@ -99,7 +99,7 @@ test_create_subtree_add () {
}
test_expect_success 'shows short help text for -h' '
- test_expect_code 129 git subtree -h >out 2>err &&
+ git subtree -h >out 2>err &&
test_must_be_empty err &&
grep -e "^ *or: git subtree pull" out &&
grep -F -e "--[no-]annotate" out
diff --git a/parse-options.c b/parse-options.c
index 67a2d372d0..742444eead 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -1135,8 +1135,9 @@ enum parse_opt_result parse_options_step(struct parse_opt_ctx_t *ctx,
case PARSE_OPT_UNKNOWN:
goto unknown;
case PARSE_OPT_HELP:
- case PARSE_OPT_HELP_ERROR:
goto show_usage;
+ case PARSE_OPT_HELP_ERROR:
+ goto show_usage_stderr;
case PARSE_OPT_NON_OPTION:
case PARSE_OPT_SUBCOMMAND:
case PARSE_OPT_COMPLETE:
@@ -1170,6 +1171,9 @@ enum parse_opt_result parse_options_step(struct parse_opt_ctx_t *ctx,
show_usage:
return usage_with_options_internal(ctx, usagestr, options,
USAGE_NORMAL, USAGE_TO_STDOUT);
+ show_usage_stderr:
+ return usage_with_options_internal(ctx, usagestr, options,
+ USAGE_NORMAL, USAGE_TO_STDERR);
}
int parse_options_end(struct parse_opt_ctx_t *ctx)
@@ -1201,6 +1205,7 @@ int parse_options(int argc, const char **argv,
parse_options_start_1(&ctx, argc, argv, prefix, options, flags);
switch (parse_options_step(&ctx, options, usagestr)) {
case PARSE_OPT_HELP:
+ exit(0);
case PARSE_OPT_HELP_ERROR:
case PARSE_OPT_ERROR:
exit(129);
@@ -1481,7 +1486,7 @@ static enum parse_opt_result usage_with_options_internal(struct parse_opt_ctx_t
if (!err && ctx && ctx->flags & PARSE_OPT_SHELL_EVAL)
fputs("EOF\nexit 0\n", outfile);
- return PARSE_OPT_HELP;
+ return err ? PARSE_OPT_HELP_ERROR : PARSE_OPT_HELP;
}
void NORETURN usage_with_options(const char * const *usagestr,
@@ -1500,11 +1505,11 @@ void show_usage_with_options_if_asked(int ac, const char **av,
if (!strcmp(av[1], "-h")) {
usage_with_options_internal(NULL, usagestr, opts,
USAGE_NORMAL, USAGE_TO_STDOUT);
- exit(129);
+ exit(0);
} else if (!strcmp(av[1], "--help-all")) {
usage_with_options_internal(NULL, usagestr, opts,
USAGE_FULL, USAGE_TO_STDOUT);
- exit(129);
+ exit(0);
}
}
}
diff --git a/t/for-each-ref-tests.sh b/t/for-each-ref-tests.sh
index bd2d45c971..b95e5b6ca0 100644
--- a/t/for-each-ref-tests.sh
+++ b/t/for-each-ref-tests.sh
@@ -522,7 +522,7 @@ test_expect_success 'Verify descending sort' '
'
test_expect_success 'Give help even with invalid sort atoms' '
- test_expect_code 129 ${git_for_each_ref} --sort=bogus -h >actual 2>&1 &&
+ ${git_for_each_ref} --sort=bogus -h >actual 2>&1 &&
grep "^usage: ${git_for_each_ref}" actual
'
diff --git a/t/t0012-help.sh b/t/t0012-help.sh
index c33501bdcd..7815ff14f2 100755
--- a/t/t0012-help.sh
+++ b/t/t0012-help.sh
@@ -260,7 +260,7 @@ do
(
GIT_CEILING_DIRECTORIES=$(pwd) &&
export GIT_CEILING_DIRECTORIES &&
- test_expect_code 129 git -C sub $builtin -h >output 2>err
+ git -C sub $builtin -h >output 2>err
) &&
test_must_be_empty err &&
test_grep usage output
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh
index ca55ea8228..30895ad6d2 100755
--- a/t/t0040-parse-options.sh
+++ b/t/t0040-parse-options.sh
@@ -68,7 +68,7 @@ Alias
EOF
test_expect_success 'test help' '
- test_must_fail test-tool parse-options -h >output 2>output.err &&
+ test-tool parse-options -h >output 2>output.err &&
test_must_be_empty output.err &&
test_cmp expect output
'
diff --git a/t/t0450-txt-doc-vs-help.sh b/t/t0450-txt-doc-vs-help.sh
index 822b0d55a5..d2844368e4 100755
--- a/t/t0450-txt-doc-vs-help.sh
+++ b/t/t0450-txt-doc-vs-help.sh
@@ -29,7 +29,7 @@ help_to_synopsis () {
return 0
fi &&
mkdir -p "$out_dir" &&
- test_expect_code 129 git $builtin -h >"$out.raw" 2>&1 &&
+ test_might_fail git $builtin -h >"$out.raw" 2>&1 &&
sed -n \
-e '1,/^$/ {
/^$/d;
diff --git a/t/t0610-reftable-basics.sh b/t/t0610-reftable-basics.sh
index e19e036898..4135db95ed 100755
--- a/t/t0610-reftable-basics.sh
+++ b/t/t0610-reftable-basics.sh
@@ -15,9 +15,9 @@ export GIT_TEST_DEFAULT_REF_FORMAT
INVALID_OID=$(test_oid 001)
test_expect_success 'pack-refs does not crash with -h' '
- test_expect_code 129 git pack-refs -h >usage &&
+ git pack-refs -h >usage &&
test_grep "[Uu]sage: git pack-refs " usage &&
- test_expect_code 129 nongit git pack-refs -h >usage &&
+ nongit git pack-refs -h >usage &&
test_grep "[Uu]sage: git pack-refs " usage
'
diff --git a/t/t1403-show-ref.sh b/t/t1403-show-ref.sh
index 36c903ca19..db4300da44 100755
--- a/t/t1403-show-ref.sh
+++ b/t/t1403-show-ref.sh
@@ -165,7 +165,7 @@ test_expect_success 'show-ref --branches, --tags, --head, pattern' '
'
test_expect_success 'show-ref --heads is deprecated and hidden' '
- test_expect_code 129 git show-ref -h >short-help &&
+ git show-ref -h >short-help &&
test_grep ! -e --heads short-help &&
git show-ref --heads >actual 2>warning &&
test_grep ! deprecated warning &&
diff --git a/t/t1410-reflog.sh b/t/t1410-reflog.sh
index ce71f9a30a..6e921bc167 100755
--- a/t/t1410-reflog.sh
+++ b/t/t1410-reflog.sh
@@ -107,12 +107,12 @@ test_expect_success setup '
'
test_expect_success 'correct usage on sub-command -h' '
- test_expect_code 129 git reflog expire -h >err &&
+ git reflog expire -h >err &&
grep "git reflog expire" err
'
test_expect_success 'correct usage on "git reflog show -h"' '
- test_expect_code 129 git reflog show -h >err &&
+ git reflog show -h >err &&
grep -F "git reflog [show]" err
'
diff --git a/t/t1418-reflog-exists.sh b/t/t1418-reflog-exists.sh
index d51ecd5e92..10387792e3 100755
--- a/t/t1418-reflog-exists.sh
+++ b/t/t1418-reflog-exists.sh
@@ -12,7 +12,7 @@ test_expect_success 'setup' '
test_expect_success 'usage' '
test_expect_code 129 git reflog exists &&
- test_expect_code 129 git reflog exists -h
+ git reflog exists -h
'
test_expect_success 'usage: unknown option' '
diff --git a/t/t1502-rev-parse-parseopt.sh b/t/t1502-rev-parse-parseopt.sh
index 455608c429..fa97591b9f 100755
--- a/t/t1502-rev-parse-parseopt.sh
+++ b/t/t1502-rev-parse-parseopt.sh
@@ -75,7 +75,7 @@ EOF
'
test_expect_success 'test --parseopt help output' '
- test_expect_code 129 git rev-parse --parseopt -- -h > output < optionspec &&
+ git rev-parse --parseopt -- -h > output < optionspec &&
test_cmp "$TEST_DIRECTORY/t1502/optionspec.help" output
'
@@ -89,7 +89,7 @@ test_expect_success 'test --parseopt help output no switches' '
|EOF
|exit 0
END_EXPECT
- test_expect_code 129 git rev-parse --parseopt -- -h > output < optionspec_no_switches &&
+ git rev-parse --parseopt -- -h > output < optionspec_no_switches &&
test_cmp expect output
'
@@ -103,7 +103,7 @@ test_expect_success 'test --parseopt help output hidden switches' '
|EOF
|exit 0
END_EXPECT
- test_expect_code 129 git rev-parse --parseopt -- -h > output < optionspec_only_hidden_switches &&
+ git rev-parse --parseopt -- -h > output < optionspec_only_hidden_switches &&
test_cmp expect output
'
@@ -119,7 +119,7 @@ test_expect_success 'test --parseopt help-all output hidden switches' '
|EOF
|exit 0
END_EXPECT
- test_expect_code 129 git rev-parse --parseopt -- --help-all > output < optionspec_only_hidden_switches &&
+ git rev-parse --parseopt -- --help-all > output < optionspec_only_hidden_switches &&
test_cmp expect output
'
@@ -258,7 +258,7 @@ test_expect_success 'test --parseopt help output: "wrapped" options normal "or:"
|exit 0
END_EXPECT
- test_must_fail git rev-parse --parseopt -- -h <spec >actual &&
+ git rev-parse --parseopt -- -h <spec >actual &&
test_cmp expect actual
'
@@ -296,12 +296,12 @@ test_expect_success 'test --parseopt help output: multi-line blurb after empty l
|exit 0
END_EXPECT
- test_must_fail git rev-parse --parseopt -- -h <spec >actual &&
+ git rev-parse --parseopt -- -h <spec >actual &&
test_cmp expect actual
'
test_expect_success 'test --parseopt help output for optionspec-neg' '
- test_expect_code 129 git rev-parse --parseopt -- \
+ git rev-parse --parseopt -- \
-h >output <"$TEST_DIRECTORY/t1502/optionspec-neg" &&
test_cmp "$TEST_DIRECTORY/t1502/optionspec-neg.help" output
'
diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 99bda36d17..b45c52bd02 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -130,18 +130,25 @@ do
archimport | citool | credential-netrc | credential-libsecret | \
credential-osxkeychain | cvsexportcommit | cvsimport | cvsserver | \
daemon | \
- difftool--helper | filter-branch | format-rev | fsck-objects | \
- get-tar-commit-id | \
+ difftool--helper | format-rev | fsck-objects | get-tar-commit-id | \
gui | gui--askpass | \
- http-backend | http-fetch | http-push | init-db | instaweb | \
- merge-octopus | merge-one-file | merge-resolve | mergetool | \
- mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remote-ftps | \
- remote-http | remote-https | replay | request-pull | send-email | \
- sh-i18n--envsubst | shell | show | stage | submodule | svn | \
- upload-archive--writer | upload-pack | web--browse | whatchanged)
- expect_outcome=expect_failure ;;
+ http-backend | http-fetch | http-push | init-db | \
+ mktag | p4 | p4.py | pickaxe | remote-ftp | remote-ftps | \
+ remote-http | remote-https | replay | send-email | \
+ sh-i18n--envsubst | shell | show | stage | \
+ upload-archive--writer | upload-pack | whatchanged)
+ h_expect_outcome=expect_failure
+ all_expect_outcome=expect_failure
+ ;;
+ filter-branch | merge-octopus | merge-one-file | merge-resolve | \
+ mergetool | submodule | svn | web--browse)
+ h_expect_outcome=expect_success
+ all_expect_outcome=expect_failure
+ ;;
*)
- expect_outcome=expect_success ;;
+ h_expect_outcome=expect_success
+ all_expect_outcome=expect_success
+ ;;
esac
case "$cmd" in
instaweb)
@@ -151,20 +158,20 @@ do
*)
prereq= ;;
esac
- test_$expect_outcome $prereq "'git $cmd -h' outside a repository" '
- test_expect_code 129 nongit git $cmd -h >usage &&
+ test_$h_expect_outcome $prereq "'git $cmd -h' outside a repository" '
+ nongit git $cmd -h >usage &&
test_grep "[Uu]sage: git $cmd " usage
'
- test_$expect_outcome $prereq "'git $cmd --help-all' outside a repository" '
- test_expect_code 129 nongit git $cmd --help-all >usage &&
+ test_$all_expect_outcome $prereq "'git $cmd --help-all' outside a repository" '
+ nongit git $cmd --help-all >usage &&
test_grep "[Uu]sage: git $cmd " usage
'
done
test_expect_success 'fmt-merge-msg does not crash with -h' '
- test_expect_code 129 git fmt-merge-msg -h >usage &&
+ git fmt-merge-msg -h >usage &&
test_grep "[Uu]sage: git fmt-merge-msg " usage &&
- test_expect_code 129 nongit git fmt-merge-msg -h >usage &&
+ nongit git fmt-merge-msg -h >usage &&
test_grep "[Uu]sage: git fmt-merge-msg " usage
'
diff --git a/t/t1800-hook.sh b/t/t1800-hook.sh
index 0132e772e4..2ea9fa13c5 100755
--- a/t/t1800-hook.sh
+++ b/t/t1800-hook.sh
@@ -75,10 +75,10 @@ sentinel_detector () {
test_expect_success 'git hook usage' '
test_expect_code 129 git hook &&
test_expect_code 129 git hook run &&
- test_expect_code 129 git hook run -h &&
+ git hook run -h &&
test_expect_code 129 git hook run --unknown 2>err &&
test_expect_code 129 git hook list &&
- test_expect_code 129 git hook list -h &&
+ git hook list -h &&
grep "unknown option" err
'
diff --git a/t/t1900-repo-info.sh b/t/t1900-repo-info.sh
index 39bb77dda0..826686955d 100755
--- a/t/t1900-repo-info.sh
+++ b/t/t1900-repo-info.sh
@@ -150,7 +150,7 @@ test_expect_success 'git repo info --keys uses lines as its default output forma
'
test_expect_success 'git repo info -h shows only repo info usage' '
- test_must_fail git repo info -h >actual &&
+ git repo info -h >actual &&
test_grep "git repo info" actual &&
test_grep ! "git repo structure" actual
'
diff --git a/t/t1901-repo-structure.sh b/t/t1901-repo-structure.sh
index 10050abd70..02cc2b594a 100755
--- a/t/t1901-repo-structure.sh
+++ b/t/t1901-repo-structure.sh
@@ -225,7 +225,7 @@ test_expect_success 'progress meter option' '
'
test_expect_success 'git repo structure -h shows only repo structure usage' '
- test_must_fail git repo structure -h >actual &&
+ git repo structure -h >actual &&
test_grep "git repo structure" actual &&
test_grep ! "git repo info" actual
'
diff --git a/t/t2006-checkout-index-basic.sh b/t/t2006-checkout-index-basic.sh
index fedd2cc097..6538a24c95 100755
--- a/t/t2006-checkout-index-basic.sh
+++ b/t/t2006-checkout-index-basic.sh
@@ -16,15 +16,15 @@ test_expect_success 'checkout-index -h in broken repository' '
cd broken &&
git init &&
>.git/index &&
- test_expect_code 129 git checkout-index -h >usage 2>&1
+ git checkout-index -h >usage 2>&1
) &&
test_grep "[Uu]sage" broken/usage
'
test_expect_success 'checkout-index does not crash with -h' '
- test_expect_code 129 git checkout-index -h >usage &&
+ git checkout-index -h >usage &&
test_grep "[Uu]sage: git checkout-index " usage &&
- test_expect_code 129 nongit git checkout-index -h >usage &&
+ nongit git checkout-index -h >usage &&
test_grep "[Uu]sage: git checkout-index " usage
'
diff --git a/t/t2107-update-index-basic.sh b/t/t2107-update-index-basic.sh
index 3bffe5da8a..004878322e 100755
--- a/t/t2107-update-index-basic.sh
+++ b/t/t2107-update-index-basic.sh
@@ -23,7 +23,7 @@ test_expect_success 'update-index -h with corrupt index' '
cd broken &&
git init &&
>.git/index &&
- test_expect_code 129 git update-index -h >usage 2>&1
+ git update-index -h >usage 2>&1
) &&
test_grep "[Uu]sage: git update-index" broken/usage
'
diff --git a/t/t3004-ls-files-basic.sh b/t/t3004-ls-files-basic.sh
index 4034a5a59f..c57afcb841 100755
--- a/t/t3004-ls-files-basic.sh
+++ b/t/t3004-ls-files-basic.sh
@@ -29,15 +29,15 @@ test_expect_success 'ls-files -h in corrupt repository' '
cd broken &&
git init &&
>.git/index &&
- test_expect_code 129 git ls-files -h >usage 2>&1
+ git ls-files -h >usage 2>&1
) &&
test_grep "[Uu]sage: git ls-files " broken/usage
'
test_expect_success 'ls-files does not crash with -h' '
- test_expect_code 129 git ls-files -h >usage &&
+ git ls-files -h >usage &&
test_grep "[Uu]sage: git ls-files " usage &&
- test_expect_code 129 nongit git ls-files -h >usage &&
+ nongit git ls-files -h >usage &&
test_grep "[Uu]sage: git ls-files " usage
'
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index e7829c2c4b..dec0e77e3c 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -33,7 +33,7 @@ test_expect_success REFFILES 'branch -h in broken repository' '
cd broken &&
git init -b main &&
>.git/refs/heads/main &&
- test_expect_code 129 git branch -h >usage 2>&1
+ git branch -h >usage 2>&1
) &&
test_grep "[Uu]sage" broken/usage
'
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index ecc35aae82..bc07e2a6ec 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -27,13 +27,13 @@ test_expect_success 'usage on cmd and subcommand invalid option' '
'
test_expect_success 'usage on main command -h emits a summary of subcommands' '
- test_expect_code 129 git stash -h >usage &&
+ git stash -h >usage &&
grep -F "usage: git stash list" usage &&
grep -F "or: git stash show" usage
'
test_expect_success 'usage for subcommands should emit subcommand usage' '
- test_expect_code 129 git stash push -h >usage &&
+ git stash push -h >usage &&
grep -F "usage: git stash [push" usage
'
diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index 1717f407c8..e1b474cc0f 100755
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
@@ -438,7 +438,7 @@ test_expect_success 'rerere --no-no-rerere-autoupdate' '
'
test_expect_success 'rerere -h' '
- test_must_fail git rerere -h >help &&
+ git rerere -h >help &&
test_grep [Uu]sage help
'
diff --git a/t/t5200-update-server-info.sh b/t/t5200-update-server-info.sh
index a551e955b5..a0630cc1fc 100755
--- a/t/t5200-update-server-info.sh
+++ b/t/t5200-update-server-info.sh
@@ -47,7 +47,7 @@ test_expect_success 'midx does not create duplicate pack entries' '
'
test_expect_success 'update-server-info does not crash with -h' '
- test_expect_code 129 git update-server-info -h >usage &&
+ git update-server-info -h >usage &&
test_grep "[Uu]sage: git update-server-info " usage
'
diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh
index 2be7cd30de..e26e833d89 100755
--- a/t/t5304-prune.sh
+++ b/t/t5304-prune.sh
@@ -365,7 +365,7 @@ test_expect_success 'gc.recentObjectsHook' '
'
test_expect_success 'prune does not crash with -h' '
- test_expect_code 129 git prune -h >usage &&
+ git prune -h >usage &&
test_grep "[Uu]sage: git prune " usage
'
diff --git a/t/t5400-send-pack.sh b/t/t5400-send-pack.sh
index b32a0a6aa7..6aa5838e2b 100755
--- a/t/t5400-send-pack.sh
+++ b/t/t5400-send-pack.sh
@@ -56,9 +56,9 @@ test_expect_success setup '
git log'
test_expect_success 'send-pack does not crash with -h' '
- test_expect_code 129 git send-pack -h >usage &&
+ git send-pack -h >usage &&
test_grep "[Uu]sage: git send-pack " usage &&
- test_expect_code 129 nongit git send-pack -h >usage &&
+ nongit git send-pack -h >usage &&
test_grep "[Uu]sage: git send-pack " usage
'
diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh
index 5930f55186..8345bc0b14 100755
--- a/t/t5512-ls-remote.sh
+++ b/t/t5512-ls-remote.sh
@@ -86,7 +86,7 @@ test_expect_success 'ls-remote -h is deprecated w/o warning' '
'
test_expect_success 'ls-remote --heads is deprecated and hidden w/o warning' '
- test_expect_code 129 git ls-remote -h >short-help &&
+ git ls-remote -h >short-help &&
test_grep ! -e --head short-help &&
git ls-remote --heads self >actual 2>warning &&
test_cmp expected.branches actual &&
diff --git a/t/t6300-for-each-ref.sh b/t/t6300-for-each-ref.sh
index 1d9809114d..6d27b42ff1 100755
--- a/t/t6300-for-each-ref.sh
+++ b/t/t6300-for-each-ref.sh
@@ -8,9 +8,9 @@ test_description='for-each-ref test'
. ./test-lib.sh
test_expect_success "for-each-ref does not crash with -h" '
- test_expect_code 129 git for-each-ref -h >usage &&
+ git for-each-ref -h >usage &&
test_grep "[Uu]sage: git for-each-ref " usage &&
- test_expect_code 129 nongit git for-each-ref -h >usage &&
+ nongit git for-each-ref -h >usage &&
test_grep "[Uu]sage: git for-each-ref " usage
'
diff --git a/t/t6500-gc.sh b/t/t6500-gc.sh
index ea9aaad470..b40d13d7ff 100755
--- a/t/t6500-gc.sh
+++ b/t/t6500-gc.sh
@@ -35,7 +35,7 @@ test_expect_success 'gc -h with invalid configuration' '
cd broken &&
git init &&
echo "[gc] pruneexpire = CORRUPT" >>.git/config &&
- test_expect_code 129 git gc -h >usage 2>&1
+ git gc -h >usage 2>&1
) &&
test_grep "[Uu]sage" broken/usage
'
diff --git a/t/t7030-verify-tag.sh b/t/t7030-verify-tag.sh
index 2c147072c1..3bc5d1e9a2 100755
--- a/t/t7030-verify-tag.sh
+++ b/t/t7030-verify-tag.sh
@@ -8,9 +8,9 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
. "$TEST_DIRECTORY/lib-gpg.sh"
test_expect_success GPG 'verify-tag does not crash with -h' '
- test_expect_code 129 git verify-tag -h >usage &&
+ git verify-tag -h >usage &&
test_grep "[Uu]sage: git verify-tag " usage &&
- test_expect_code 129 nongit git verify-tag -h >usage &&
+ nongit git verify-tag -h >usage &&
test_grep "[Uu]sage: git verify-tag " usage
'
diff --git a/t/t7508-status.sh b/t/t7508-status.sh
index c2057bc94c..de7d7beec3 100755
--- a/t/t7508-status.sh
+++ b/t/t7508-status.sh
@@ -16,7 +16,7 @@ test_expect_success 'status -h in broken repository' '
cd broken &&
git init &&
echo "[status] showuntrackedfiles = CORRUPT" >>.git/config &&
- test_expect_code 129 git status -h >usage 2>&1
+ git status -h >usage 2>&1
) &&
test_grep "[Uu]sage" broken/usage
'
@@ -28,7 +28,7 @@ test_expect_success 'commit -h in broken repository' '
cd broken &&
git init &&
echo "[status] showuntrackedfiles = CORRUPT" >>.git/config &&
- test_expect_code 129 git commit -h >usage 2>&1
+ git commit -h >usage 2>&1
) &&
test_grep "[Uu]sage" broken/usage
'
diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh
index aa9108da54..e641f9e334 100755
--- a/t/t7510-signed-commit.sh
+++ b/t/t7510-signed-commit.sh
@@ -9,9 +9,9 @@ GNUPGHOME_NOT_USED=$GNUPGHOME
. "$TEST_DIRECTORY/lib-gpg.sh"
test_expect_success GPG 'verify-commit does not crash with -h' '
- test_expect_code 129 git verify-commit -h >usage &&
+ git verify-commit -h >usage &&
test_grep "[Uu]sage: git verify-commit " usage &&
- test_expect_code 129 nongit git verify-commit -h >usage &&
+ nongit git verify-commit -h >usage &&
test_grep "[Uu]sage: git verify-commit " usage
'
diff --git a/t/t7600-merge.sh b/t/t7600-merge.sh
index f877d9a433..fd3d1d67f9 100755
--- a/t/t7600-merge.sh
+++ b/t/t7600-merge.sh
@@ -173,7 +173,7 @@ test_expect_success 'merge -h with invalid index' '
cd broken &&
git init &&
>.git/index &&
- test_expect_code 129 git merge -h >usage
+ git merge -h >usage
) &&
test_grep "[Uu]sage: git merge" broken/usage
'
diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh
index 8a91ff3603..961de3efab 100755
--- a/t/t7800-difftool.sh
+++ b/t/t7800-difftool.sh
@@ -27,12 +27,11 @@ prompt_given ()
}
test_expect_success 'basic usage requires no repo' '
- test_expect_code 129 git difftool -h >output &&
+ git difftool -h >output &&
test_grep ^usage: output &&
# create a ceiling directory to prevent Git from finding a repo
mkdir -p not/repo &&
test_when_finished rm -r not &&
- test_expect_code 129 \
env GIT_CEILING_DIRECTORIES="$(pwd)/not" \
git -C not/repo difftool -h >output &&
test_grep ^usage: output
diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
index d7f82e1bec..9886f641fc 100755
--- a/t/t7900-maintenance.sh
+++ b/t/t7900-maintenance.sh
@@ -35,7 +35,7 @@ test_systemd_analyze_verify () {
}
test_expect_success 'help text' '
- test_expect_code 129 git maintenance -h >actual &&
+ git maintenance -h >actual &&
test_grep "usage: git maintenance <subcommand>" actual &&
test_expect_code 129 git maintenance barf 2>err &&
test_grep "unknown subcommand: \`barf'\''" err &&
diff --git a/usage.c b/usage.c
index 527edb1e79..3f0118ab2a 100644
--- a/usage.c
+++ b/usage.c
@@ -188,7 +188,7 @@ static void show_usage_if_asked_helper(const char *err, ...)
va_start(params, err);
vfreportf(stdout, _("usage: "), err, params);
va_end(params);
- exit(129);
+ exit(0);
}
void show_usage_if_asked(int ac, const char **av, const char *err)
^ permalink raw reply related
* [PATCH v2 1/4] t1517: skip svn tests if svn is not installed
From: brian m. carlson @ 2026-07-01 21:24 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jeff King
In-Reply-To: <20260701212442.1430084-1-sandals@crustytoothpaste.net>
The svn tests currently assume that git-svn's option parsing will always
fail the tests because it exits 0 on --help, not 129. However, in a
future commit, we'll expect it to exit 0 and the tests will then need to
be updated to succeed in some cases and fail in others.
We therefore need to have t1517 determine whether the Subversion Perl
modules are present, since if they are not, git-svn will die on start
and then it needs to continue to expect failure. Add a stripped down
version of the tests in t/lib-git-svn.sh as a prerequisite we can use
here for our svn tests.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
t/t1517-outside-repo.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index c557f2f55c..583784f21b 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -4,6 +4,14 @@ test_description='check random commands outside repo'
. ./test-lib.sh
+test_lazy_prereq SVN '
+ test_have_prereq PERL && test -n "$NO_SVN_TESTS" && perl -w -e "
+ use SVN::Core;
+ use SVN::Repos;
+ \$SVN::Core::VERSION gt '1.1.0' or exit(42);
+ "
+'
+
test_expect_success 'set up a non-repo directory and test file' '
GIT_CEILING_DIRECTORIES=$(pwd) &&
export GIT_CEILING_DIRECTORIES &&
@@ -138,6 +146,8 @@ do
case "$cmd" in
instaweb)
prereq=PERL ;;
+ svn)
+ prereq=SVN ;;
*)
prereq= ;;
esac
^ permalink raw reply related
* [PATCH v2 3/4] rev-parse: have --parseopt callers exit 0 on --help
From: brian m. carlson @ 2026-07-01 21:24 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jeff King
In-Reply-To: <20260701212442.1430084-1-sandals@crustytoothpaste.net>
The standard philosophy for Unix software when a help option (such as
--help) is specified is that the software should exit 0, printing the
help output to standard output, since the standard output is for
user-requested output and the program performed the requested task
successfully. If the user specifies an incorrect option, then the help
output should be printed to standard error (since the user has made a
mistake) and it should exit unsuccessfully.
git rev-parse --parseopt properly directs the output in both of these
cases, but it currently exits 129 when it receives a --help or -h option
on the command line, which causes its invoking script to do the same.
This is not in line with the usual behavior and it causes scripts using
this command to exit unsuccessfully on --help as well.
Note that Git subcommands implemented using scripts, such as git
submodule, don't have this problem because Git itself intercepts the
--help option and runs man (or a similar tool), which then exits 0.
However, this still affects the myriad scripts that use this
functionality because Git is widespread and the --parseopt functionality
is a good way to get sensible option parsing across shells in a portable
way.
Because git rev-parse --parseopt is intended to be eval'd by the shell,
when help output is to be printed to standard output, Git actually
prints a cat command with a heredoc since the standard output is being
evaluated by the shell. Thus, to do the right thing, simply add an
"exit 0" right after the end of the heredoc, which will cause the
invoking program to exit successfully.
The usual invocation recommended by the manual page is this:
eval "$(echo "$OPTS_SPEC" | git rev-parse --parseopt -- "$@" || echo exit $?)"
Thus, the fact that git rev-parse --parseopt still exits 129 in this
case is irrelevant, since the "echo exit $?" will print "exit 129", but
that will be after the "exit 0" printed by Git—and thus ignored, since
the shell will have already exited successfully.
Update the tests for this case. Note that we no longer need to delete
only the first and last lines in some tests, so add a command to delete
the end of the heredoc as well. We could do something clever with sed
to delete all but the last two lines or switch to head and tail, but
those would be more complicated and less readable, so just stick with
the simple approach.
In t1517, add three shell scripts to the failure case because they no
longer return 129 as expected. In a future commit, we'll change the
expected result to exit 0 and these will become successful again.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
---
parse-options.c | 2 +-
t/t1502-rev-parse-parseopt.sh | 9 +++++++--
t/t1502/optionspec-neg.help | 1 +
t/t1502/optionspec.help | 1 +
t/t1517-outside-repo.sh | 6 +++---
5 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/parse-options.c b/parse-options.c
index a623961800..67a2d372d0 100644
--- a/parse-options.c
+++ b/parse-options.c
@@ -1479,7 +1479,7 @@ static enum parse_opt_result usage_with_options_internal(struct parse_opt_ctx_t
fputc('\n', outfile);
if (!err && ctx && ctx->flags & PARSE_OPT_SHELL_EVAL)
- fputs("EOF\n", outfile);
+ fputs("EOF\nexit 0\n", outfile);
return PARSE_OPT_HELP;
}
diff --git a/t/t1502-rev-parse-parseopt.sh b/t/t1502-rev-parse-parseopt.sh
index 3962f1d288..455608c429 100755
--- a/t/t1502-rev-parse-parseopt.sh
+++ b/t/t1502-rev-parse-parseopt.sh
@@ -12,7 +12,7 @@ check_invalid_long_option () {
cat <<-\EOF &&
error: unknown option `'${opt#--}\''
EOF
- sed -e 1d -e \$d <"$TEST_DIRECTORY/t1502/$spec.help"
+ sed -e 1d -e /EOF/d -e \$d <"$TEST_DIRECTORY/t1502/$spec.help"
} >expect &&
test_expect_code 129 git rev-parse --parseopt -- $opt \
2>output <"$TEST_DIRECTORY/t1502/$spec" &&
@@ -87,6 +87,7 @@ test_expect_success 'test --parseopt help output no switches' '
| some-command does foo and bar!
|
|EOF
+|exit 0
END_EXPECT
test_expect_code 129 git rev-parse --parseopt -- -h > output < optionspec_no_switches &&
test_cmp expect output
@@ -100,6 +101,7 @@ test_expect_success 'test --parseopt help output hidden switches' '
| some-command does foo and bar!
|
|EOF
+|exit 0
END_EXPECT
test_expect_code 129 git rev-parse --parseopt -- -h > output < optionspec_only_hidden_switches &&
test_cmp expect output
@@ -115,6 +117,7 @@ test_expect_success 'test --parseopt help-all output hidden switches' '
| --[no-]hidden1 A hidden switch
|
|EOF
+|exit 0
END_EXPECT
test_expect_code 129 git rev-parse --parseopt -- --help-all > output < optionspec_only_hidden_switches &&
test_cmp expect output
@@ -125,7 +128,7 @@ test_expect_success 'test --parseopt invalid switch help output' '
cat <<-\EOF &&
error: unknown option `does-not-exist'\''
EOF
- sed -e 1d -e \$d <"$TEST_DIRECTORY/t1502/optionspec.help"
+ sed -e 1d -e /EOF/d -e \$d <"$TEST_DIRECTORY/t1502/optionspec.help"
} >expect &&
test_expect_code 129 git rev-parse --parseopt -- --does-not-exist 1>/dev/null 2>output < optionspec &&
test_cmp expect output
@@ -252,6 +255,7 @@ test_expect_success 'test --parseopt help output: "wrapped" options normal "or:"
| -h, --help show the help
|
|EOF
+ |exit 0
END_EXPECT
test_must_fail git rev-parse --parseopt -- -h <spec >actual &&
@@ -289,6 +293,7 @@ test_expect_success 'test --parseopt help output: multi-line blurb after empty l
| -h, --help show the help
|
|EOF
+ |exit 0
END_EXPECT
test_must_fail git rev-parse --parseopt -- -h <spec >actual &&
diff --git a/t/t1502/optionspec-neg.help b/t/t1502/optionspec-neg.help
index 7a29f8cb03..f85be7b8fd 100644
--- a/t/t1502/optionspec-neg.help
+++ b/t/t1502/optionspec-neg.help
@@ -10,3 +10,4 @@ usage: some-command [options] <args>...
--no-negative cannot be positivated
EOF
+exit 0
diff --git a/t/t1502/optionspec.help b/t/t1502/optionspec.help
index cbdd54d41b..ded35ebc82 100755
--- a/t/t1502/optionspec.help
+++ b/t/t1502/optionspec.help
@@ -34,3 +34,4 @@ Extras
--[no-]extra1 line above used to cause a segfault but no longer does
EOF
+exit 0
diff --git a/t/t1517-outside-repo.sh b/t/t1517-outside-repo.sh
index 583784f21b..99bda36d17 100755
--- a/t/t1517-outside-repo.sh
+++ b/t/t1517-outside-repo.sh
@@ -133,10 +133,10 @@ do
difftool--helper | filter-branch | format-rev | fsck-objects | \
get-tar-commit-id | \
gui | gui--askpass | \
- http-backend | http-fetch | http-push | init-db | \
+ http-backend | http-fetch | http-push | init-db | instaweb | \
merge-octopus | merge-one-file | merge-resolve | mergetool | \
- mktag | p4 | p4.py | pickaxe | remote-ftp | remote-ftps | \
- remote-http | remote-https | replay | send-email | \
+ mktag | p4 | p4.py | pickaxe | quiltimport | remote-ftp | remote-ftps | \
+ remote-http | remote-https | replay | request-pull | send-email | \
sh-i18n--envsubst | shell | show | stage | submodule | svn | \
upload-archive--writer | upload-pack | web--browse | whatchanged)
expect_outcome=expect_failure ;;
^ permalink raw reply related
* [PATCH v2 0/4] rev-parse: exit 0 on --help
From: brian m. carlson @ 2026-07-01 21:24 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, Jeff King
In-Reply-To: <20260316220742.1286157-1-sandals@crustytoothpaste.net>
The standard philosophy for Unix software when a help option (such as
--help) is specified is that the software should exit 0, printing the
help output to standard output, since the standard output is for
user-requested output and the program performed the requested task
successfully. If the user specifies an incorrect option, then the help
output should be printed to standard error (since the user has made a
mistake) and it should exit unsuccessfully.
git rev-parse --parseopt properly directs the output in both of these
cases, but it currently exits 129 when it receives a --help or -h option
on the command line, which causes its invoking script to do the same.
This is not in line with the usual behavior and it causes scripts using
this command to exit unsuccessfully on --help as well.
This series introduces some changes to distinguish the --help and -h
options from other cases in which we print help output and adjusts the
exit code to 0 from those two options. We continue to exit 129 when the
options are invalid, which is useful information to have for callers.
We also make the relevant changes such that `git rev-parse --parseopt`
does the same thing as long as it is invoked in the way specified in the
manual page (which a quick GitHub search shows almost everyone does).
One of the patches is rather long because we have many cases in which
we've hard-coded exit code 129 into our tests. However, the changes
there should not be complex, only somewhat tedious to review.
brian m. carlson (4):
t1517: skip svn tests if svn is not installed
parse-options: add a separate case for help output on error
rev-parse: have --parseopt callers exit 0 on --help
parse-options: exit 0 on -h
builtin/blame.c | 2 ++
builtin/shortlog.c | 2 ++
builtin/update-index.c | 2 ++
contrib/subtree/t/t7900-subtree.sh | 2 +-
parse-options.c | 20 ++++++++++----
parse-options.h | 3 ++-
t/for-each-ref-tests.sh | 2 +-
t/t0012-help.sh | 2 +-
t/t0040-parse-options.sh | 2 +-
t/t0450-txt-doc-vs-help.sh | 2 +-
t/t0610-reftable-basics.sh | 4 +--
t/t1403-show-ref.sh | 2 +-
t/t1410-reflog.sh | 4 +--
t/t1418-reflog-exists.sh | 2 +-
t/t1502-rev-parse-parseopt.sh | 23 +++++++++-------
t/t1502/optionspec-neg.help | 1 +
t/t1502/optionspec.help | 1 +
t/t1517-outside-repo.sh | 43 +++++++++++++++++++++---------
t/t1800-hook.sh | 4 +--
t/t1900-repo-info.sh | 2 +-
t/t1901-repo-structure.sh | 2 +-
t/t2006-checkout-index-basic.sh | 6 ++---
t/t2107-update-index-basic.sh | 2 +-
t/t3004-ls-files-basic.sh | 6 ++---
t/t3200-branch.sh | 2 +-
t/t3903-stash.sh | 4 +--
t/t4200-rerere.sh | 2 +-
t/t5200-update-server-info.sh | 2 +-
t/t5304-prune.sh | 2 +-
t/t5400-send-pack.sh | 4 +--
t/t5512-ls-remote.sh | 2 +-
t/t6300-for-each-ref.sh | 4 +--
t/t6500-gc.sh | 2 +-
t/t7030-verify-tag.sh | 4 +--
t/t7508-status.sh | 4 +--
t/t7510-signed-commit.sh | 4 +--
t/t7600-merge.sh | 2 +-
t/t7800-difftool.sh | 3 +--
t/t7900-maintenance.sh | 2 +-
usage.c | 2 +-
40 files changed, 113 insertions(+), 73 deletions(-)
^ permalink raw reply
* Re: [PATCH v5 00/10] commit-reach: terminate merge-base walk when one side is exhausted
From: Kristofer Karlsson @ 2026-07-01 21:15 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Kristofer Karlsson via GitGitGadget, git
In-Reply-To: <xmqqpl16mq3v.fsf@gitster.g>
On Wed, 1 Jul 2026 at 22:06, Junio C Hamano <gitster@pobox.com> wrote:
>
> I thought that the plan in
>
> https://lore.kernel.org/git/CAL71e4P4GbYYv1LdarAbeodm06q841wj4gdGpn0QYADQjOB5gw@mail.gmail.com/
>
> was to make this v5 on top of kk/commit-reach-find-all-fix topic.
>
> I tried to prepare a merge of kk/commit-reach-find-all-fix into
> v2.55.0 and then used "git am -3" to apply these patches on top,
> but there were conflicts, and after resolving 7/10, t6600 stops
> passing.
>
> Perhaps it is best to ask you rebase these patches on top of a merge
> of kk/commit-reach-find-all-fix into v2.55.0?
You are right, I am sorry about that -- I will wait for
kk/commit-reach-find-all-fix to land and then fix up a proper v6.
In the meantime, there are still some aspects of this v5 that would
benefit from some discussion and feedback -- specifically the new
test diagnostic helper (patch 2) and the commit-date ordering
fallback removal (patch 10). Both are new in this version and could
be seen as optional.
Thanks,
Kristofer
^ permalink raw reply
* Re: [PATCH v5 00/10] commit-reach: terminate merge-base walk when one side is exhausted
From: Junio C Hamano @ 2026-07-01 20:06 UTC (permalink / raw)
To: Kristofer Karlsson via GitGitGadget; +Cc: git, Kristofer Karlsson
In-Reply-To: <pull.2149.v5.git.1782923832.gitgitgadget@gmail.com>
"Kristofer Karlsson via GitGitGadget" <gitgitgadget@gmail.com>
writes:
> Changes since v4:
>
> * New patch 2/10: added test_trace2_data_singular helper to
> test-lib-functions.sh. Shows expected/actual values on assertion failure
> instead of a silent grep failure. Makes iterating on step counts much
> easier.
>
> * New patch 6/10: added clock-skew topologies (se-, se2-) that expose
> side-exhaustion bugs when the commit-date ordering fallback fires with a
> v1 commit graph. All topologies use a shared skew_commit helper. Includes
> step count assertions for edge-case tests from patch 3.
>
> * Folded the nonstale_queue dedup wrapper removal (previously separate
> patch 6/8) into the paint_state introduction in patch 7/10.
>
> * New patch 10/10: remove the commit-date ordering fallback in
> paint_down_to_common(). The fallback (091cf18e) was a performance
> optimization for v1 commit graphs, but it breaks the generation ordering
> invariant that both the side-exhaustion and single-result optimizations
> depend on. With side-exhaustion in place, the fallback is no longer
> needed. If kept, this supersedes the separate "commit-reach: fix
> !FIND_ALL early exit with v1 commit graph" topic.
I thought that the plan in
https://lore.kernel.org/git/CAL71e4P4GbYYv1LdarAbeodm06q841wj4gdGpn0QYADQjOB5gw@mail.gmail.com/
was to make this v5 on top of kk/commit-reach-find-all-fix topic.
I tried to prepare a merge of kk/commit-reach-find-all-fix into
v2.55.0 and then used "git am -3" to apply these patches on top,
but there were conflicts, and after resolving 7/10, t6600 stops
passing.
Perhaps it is best to ask you rebase these patches on top of a merge
of kk/commit-reach-find-all-fix into v2.55.0?
^ permalink raw reply
* [PATCH] meson: restore hook-list.h to builtin_sources
From: Mike Gilbert @ 2026-07-01 19:39 UTC (permalink / raw)
To: git; +Cc: adrian.ratiu, Mike Gilbert
This fixes a racy build failure.
```
builtin/bugreport.c:12:10: fatal error: hook-list.h: No such file or directory
12 | #include "hook-list.h"
| ^~~~~~~~~~~~~
```
hook-list.h must be generated before builtin/bugreport.c is compiled.
Bug: https://bugs.gentoo.org/978326
Fixes: 2eb541e8f2a9 (hook: move is_known_hook() to hook.c for wider use, 2026-04-10)
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
---
meson.build | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/meson.build b/meson.build
index 3247697f74aa..bdc83843e8e0 100644
--- a/meson.build
+++ b/meson.build
@@ -278,7 +278,20 @@ compat_sources = [
'compat/terminal.c',
]
+hook_list = custom_target(
+ input: 'Documentation/githooks.adoc',
+ output: 'hook-list.h',
+ command: [
+ shell,
+ meson.current_source_dir() + '/tools/generate-hooklist.sh',
+ meson.current_source_dir(),
+ '@OUTPUT@',
+ ],
+ env: script_environment,
+)
+
libgit_sources = [
+ hook_list,
'abspath.c',
'add-interactive.c',
'add-patch.c',
@@ -566,19 +579,8 @@ libgit_sources += custom_target(
env: script_environment,
)
-libgit_sources += custom_target(
- input: 'Documentation/githooks.adoc',
- output: 'hook-list.h',
- command: [
- shell,
- meson.current_source_dir() + '/tools/generate-hooklist.sh',
- meson.current_source_dir(),
- '@OUTPUT@',
- ],
- env: script_environment,
-)
-
builtin_sources = [
+ hook_list,
'builtin/add.c',
'builtin/am.c',
'builtin/annotate.c',
--
2.54.0
^ permalink raw reply related
* Bug report (2.55.0.windows.1): git gui: "configuration error" when home directory contains non-ASCII characters on Windows
From: Martin Malec @ 2026-07-01 18:29 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 2787 bytes --]
What did you do before the bug happened? Install latest git 2.55.0
on Win11 25H2 Pro Czech, try starting Git Gui via Start Menu. User
logged in via Entra ID (AzureAD) which creates automatically home
directory in C:\Users\ containing non-ascii diacritical marks (here
`ý` - accented `y` in Czech language)
What did you expect to happen? Git GUI opens fine
What happened instead? Dialog box with error and tofu characters
instead of real unicode characters: The defined shell
('C:/Users/PetraKA1/2ovA¡/AppData/Local/Programs/Git/usr/bin/sh.exe')
is not usable, it must be an absolute path to an executable.)
git-gui fails to start with "The defined shell ('...') is not
usable, it must be an absolute path to an executable." when the
user's home directory path contains non-ASCII characters (e.g.,
accented letters from an EntraID profile).
Steps to Reproduce:
1. Have a Windows user profile with non-ASCII characters in the username
2. Install Git for Windows (per-user or system-wide under a path
containing non-ASCII chars)
3. Run `git gui`
4. Observe the error dialog
Root Cause as found by OpenCode using Big Pickle AI model: In
`git-gui.tcl` line 403, `safe_exec [list cygpath -m $_shellpath]`
captures cygpath's output using Tcl's default system encoding (ANSI
code page), but cygpath outputs in UTF-8. When the path contains
non-ASCII characters, the encoding mismatch produces a corrupted
path that fails validation. Suggested Fix according to Big Pickle, I
approved the agent to perform the fix and it worked, then Git GUI
could be run fine: Replace the `safe_exec` call with a pipe opened
through `safe_open_command` and explicitly set `-encoding utf-8` on
the channel, matching the pattern used in `git_redir` and
`_parse_config`.
```tcl
if {[is_Windows]} {
set cmdp [make_arglist_safe [list cygpath -m $_shellpath]]
set fd [open [concat [list | ] $cmdp] r]
fconfigure $fd -encoding utf-8
set _shellpath [string trimright [read $fd] "\n\r"]
close $fd
}
[System Info]
git version:
git version 2.55.0.windows.1
cpu: x86_64
built from commit: bf5afdecc10478397d7059d07573630902fb2e2f
sizeof-long: 4
sizeof-size_t: 8
shell-path: D:/git-sdk-64-build-installers/usr/bin/sh
rust: disabled
feature: fsmonitor--daemon
gettext: enabled
libcurl: 8.21.0
OpenSSL: OpenSSL 3.5.7 9 Jun 2026
zlib: 1.3.2
SHA-1: SHA1_DC
SHA-256: SHA256_BLK
default-ref-format: files
default-hash: sha1
uname: Windows 10.0 26200
compiler info: gnuc: 16.1
libc info: no libc information available
$SHELL (typically, interactive shell): <unset>
[Enabled Hooks]
not run from a git repository - no hooks to show
Regards
--
Martin Malec
https://github.com/brozkeff/
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 322 bytes --]
^ permalink raw reply
* Re: [PATCH GSoC v15 05/13] fetch-pack: drop static `advertise_sid` variable
From: Junio C Hamano @ 2026-07-01 18:19 UTC (permalink / raw)
To: Pablo Sabater
Cc: git, chandrapratap3519, chriscool, eric.peijian, jltobler,
karthik.188, peff, toon, Jonathan Tan, Calvin Wan
In-Reply-To: <20260701-ps-eric-work-rebase-v15-5-c88a43b63917@gmail.com>
Pablo Sabater <pabloosabaterr@gmail.com> writes:
> `write_fetch_command_and_capabilities()` is moved to `connect.c` in a
> subsequent commit. To prepare for that, drop the static variable usage
> of `advertise_sid`. Currently `advertise_sid` is used in two places:
>
> 1. In function `do_fetch_pack()`:
> if (!server_supports("session_id"))
> advertise_sid = 0;
> 2. In function `fetch_pack_config()`:
> repo_config_get_bool("transfer.advertisesid", &advertise_sid);
>
> Since `do_fetch_pack()` is only relevant for protocol v1, it can be
> ignored because `write_fetch_command_and_capabilities()` is only used in
> protocol v2.
>
> About 2, call `repo_config_get_bool()` directly inside of the function.
Puzzled. The patch does introduce a local on-stack variable with
the same name, but does not remove the file-scope global one.
> diff --git a/fetch-pack.c b/fetch-pack.c
> index f13951d154..ad07603755 100644
> --- a/fetch-pack.c
> +++ b/fetch-pack.c
> @@ -1380,6 +1380,9 @@ static void write_fetch_command_and_capabilities(struct strbuf *req_buf,
> const struct string_list *server_options)
> {
> const char *hash_name;
> + int advertise_sid;
> +
> + repo_config_get_bool(the_repository, "transfer.advertisesid", &advertise_sid);
If there is no such configuration variable defined anywhere in the
system, advertise_sid will be left uninitialied. Wouldn't it cause
problems later.
Initialize it to 0 (if the default is not to advertise, which I
think is the case but please double check), and you would be OK,
probably?
> ensure_server_supports_v2("fetch");
> packet_buf_write(req_buf, "command=fetch");
> @@ -1395,7 +1398,7 @@ static void write_fetch_command_and_capabilities(struct strbuf *req_buf,
> }
>
> if (server_feature_v2("object-format", &hash_name)) {
> - int hash_algo = hash_algo_by_name(hash_name);
> + const unsigned int hash_algo = hash_algo_by_name(hash_name);
> if (hash_algo_by_ptr(the_hash_algo) != hash_algo)
> die(_("mismatched algorithms: client %s; server %s"),
> the_hash_algo->name, hash_name);
> While at it, change `hash_algo`'s type to match `hash_algo_by_name()`'s
> actual return type (`unsigned int`) and make it `const`.
This one makes sense, but is better left out to a separate step.
Especially when the primary focus of the change is iffy (see above).
^ permalink raw reply
* Re: [PATCH v4 1/1] environment: move excludes_file into repo_config_values
From: Tian Yuchen @ 2026-07-01 18:14 UTC (permalink / raw)
To: Junio C Hamano, Christian Couder
Cc: git, cirnovskyv, szeder.dev, Ayush Chandekar, Olamide Caleb Bello
In-Reply-To: <054b3fb6-0e69-473d-9778-b1b11ea82b3a@malon.dev>
On 7/1/26 00:20, Tian Yuchen wrote:
>
> Thank you both for paving a clear way forward.
>
> For the upcoming V5 patch, I will implement:
>
> 1. Revert to the shields ('return NULL' for the getter, and bypassing
> 'repo != repository' for the _clear()).
> 2. Add 'NEEDSWORK' comments above them documenting that these are
> temporary changes.
> 3. Update the commit message to reflect this.
>
> Once this initial migration safely lands, the next goal will be to
> investigate those failing CI tests.
>
> Will send out V5 shortly.
>
> Regards, yuchen
>
Sorry, I forgot to test the repo_excludes_file() and
repo_config_values_clear() with/without checks separately earlier. As
for repo_excludes_files(), I found that the check wasn't necessary, so I
removed it in v6.
In other words, we're now only filtering out calls that aren't passing
'the_repository' to _clear(), which is still a task to be addressed in
the future. I think the current situation should be fairly satisfactory.
Hope this helps.
Regards, yuchen
^ permalink raw reply
* [PATCH v6 1/1] environment: move excludes_file into repo_config_values
From: Tian Yuchen @ 2026-07-01 18:08 UTC (permalink / raw)
To: git
Cc: cirnovskyv, szeder.dev, Tian Yuchen, Christian Couder,
Ayush Chandekar, Olamide Caleb Bello
In-Reply-To: <20260701180813.776173-1-cat@malon.dev>
The global variable 'excludes_file' is used to track the path to the
global ignore file. If this variable is NULL, 'setup_standard_excludes()'
in 'dir.c' forcefully evaluates and assigns the XDG default path to it.
Continue the libification effort by encapsulating this lazy-loading
fallback logic into a proper getter and moving the variable into
'struct repo_config_values'.
Since 'excludes_file' is a dynamically allocated string, it requires
proper heap memory management. Introduce repo_config_values_clear()
and wire it up in 'repo_clear()' to safely free this memory when a
repository instance is destroyed. Also clean up the heap-allocated
'attributes_file' in this new destructor while we are at it.
Note on transition:
Submodules are currently not supported by repo_config_values().
Since repo_clear() cleans up all repository instances (including
submodules), we must bypass them in repo_config_values_clear() to
prevent hitting the BUG() in repository.c:59. In the future when
submodules are supported, this check should be removed.
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Mentored-by: Olamide Caleb Bello <belkid98@gmail.com>
Signed-off-by: Tian Yuchen <cat@malon.dev>
---
dir.c | 4 ++--
environment.c | 33 ++++++++++++++++++++++++++++++---
environment.h | 13 ++++++++++++-
repository.c | 1 +
4 files changed, 45 insertions(+), 6 deletions(-)
diff --git a/dir.c b/dir.c
index 7a73690fbc..4f87a52b3c 100644
--- a/dir.c
+++ b/dir.c
@@ -3481,11 +3481,11 @@ static GIT_PATH_FUNC(git_path_info_exclude, "info/exclude")
void setup_standard_excludes(struct dir_struct *dir)
{
+ const char *excludes_file = repo_excludes_file(the_repository);
+
dir->exclude_per_dir = ".gitignore";
/* core.excludesfile defaulting to $XDG_CONFIG_HOME/git/ignore */
- if (!excludes_file)
- excludes_file = xdg_config_home("ignore");
if (excludes_file && !access_or_warn(excludes_file, R_OK, 0))
add_patterns_from_file_1(dir, excludes_file,
dir->untracked ? &dir->internal.ss_excludes_file : NULL);
diff --git a/environment.c b/environment.c
index ba2c60103f..f1f859dd08 100644
--- a/environment.c
+++ b/environment.c
@@ -57,7 +57,6 @@ enum fsync_method fsync_method = FSYNC_METHOD_DEFAULT;
enum fsync_component fsync_components = FSYNC_COMPONENTS_DEFAULT;
char *editor_program;
char *askpass_program;
-char *excludes_file;
enum auto_crlf auto_crlf = AUTO_CRLF_FALSE;
enum eol core_eol = EOL_UNSET;
int global_conv_flags_eol = CONV_EOL_RNDTRP_WARN;
@@ -134,6 +133,14 @@ int is_bare_repository(void)
return is_bare_repository_cfg && !repo_get_work_tree(the_repository);
}
+const char *repo_excludes_file(struct repository *repo)
+{
+ if (!repo_config_values(repo)->excludes_file)
+ repo_config_values(repo)->excludes_file = xdg_config_home("ignore");
+
+ return repo_config_values(repo)->excludes_file;
+}
+
int have_git_dir(void)
{
return startup_info->have_repository
@@ -461,8 +468,8 @@ int git_default_core_config(const char *var, const char *value,
}
if (!strcmp(var, "core.excludesfile")) {
- FREE_AND_NULL(excludes_file);
- return git_config_pathname(&excludes_file, var, value);
+ FREE_AND_NULL(cfg->excludes_file);
+ return git_config_pathname(&cfg->excludes_file, var, value);
}
if (!strcmp(var, "core.whitespace")) {
@@ -715,6 +722,7 @@ int git_default_config(const char *var, const char *value,
void repo_config_values_init(struct repo_config_values *cfg)
{
cfg->attributes_file = NULL;
+ cfg->excludes_file = NULL;
cfg->apply_sparse_checkout = 0;
cfg->branch_track = BRANCH_TRACK_REMOTE;
cfg->trust_ctime = 1;
@@ -726,3 +734,22 @@ void repo_config_values_init(struct repo_config_values *cfg)
cfg->sparse_expect_files_outside_of_patterns = 0;
cfg->warn_on_object_refname_ambiguity = 1;
}
+
+void repo_config_values_clear(struct repository *repo)
+{
+ struct repo_config_values *cfg;
+
+ /*
+ * NEEDSWORK: Submodules are currently not supported by
+ * repo_config_values(). Since repo_clear() cleans up all
+ * repository instances (including submodules), we must bypass
+ * them here to prevent hitting the BUG() in repository.c:59.
+ */
+ if (repo != the_repository)
+ return;
+
+ cfg = repo_config_values(repo);
+
+ FREE_AND_NULL(cfg->attributes_file);
+ FREE_AND_NULL(cfg->excludes_file);
+}
diff --git a/environment.h b/environment.h
index 6f18286955..2e8352de7f 100644
--- a/environment.h
+++ b/environment.h
@@ -90,6 +90,7 @@ struct repository;
struct repo_config_values {
/* section "core" config values */
char *attributes_file;
+ char *excludes_file;
int apply_sparse_checkout;
int trust_ctime;
int check_stat;
@@ -133,8 +134,19 @@ int git_default_config(const char *, const char *,
int git_default_core_config(const char *var, const char *value,
const struct config_context *ctx, void *cb);
+const char *repo_excludes_file(struct repository *repo);
+
void repo_config_values_init(struct repo_config_values *cfg);
+/*
+ * Frees memory allocated for dynamically loaded configuration values
+ * inside `repo_config_values`.
+ *
+ * As dynamically allocated variables are migrated into this struct,
+ * their FREE_AND_NULL() calls should be appended here.
+ */
+void repo_config_values_clear(struct repository *repo);
+
/*
* TODO: All the below state either explicitly or implicitly relies on
* `the_repository`. We should eventually get rid of these and make the
@@ -208,7 +220,6 @@ extern char *git_log_output_encoding;
extern char *editor_program;
extern char *askpass_program;
-extern char *excludes_file;
/*
* The character that begins a commented line in user-editable file
diff --git a/repository.c b/repository.c
index 187dd471c4..b31f1b7852 100644
--- a/repository.c
+++ b/repository.c
@@ -388,6 +388,7 @@ void repo_clear(struct repository *repo)
FREE_AND_NULL(repo->parsed_objects);
repo_settings_clear(repo);
+ repo_config_values_clear(repo);
if (repo->config) {
git_configset_clear(repo->config);
--
2.43.0
^ permalink raw reply related
* [PATCH v6 0/1] environment: move excludes_file into repo_config_values
From: Tian Yuchen @ 2026-07-01 18:08 UTC (permalink / raw)
To: git
Cc: cirnovskyv, szeder.dev, Tian Yuchen, Christian Couder,
Ayush Chandekar, Olamide Caleb Bello
In-Reply-To: <20260630164401.2906091-1-cat@malon.dev>
This patch continues the libification effort by migrating the global
string variable 'excludes_file' into 'struct repo_config_values'. Since
this is a dynamically allocated variable, the migration requires proper
heap memory management.
This patch mainly does three things:
- Abstract the XDG fallback lazy-loading logic out of dir.c into a proper
getter.
- Move the variables into the struct repo_config_values.
- Introduce the memory destructor 'repo_config_values_clear()'.
Changes since V5:
Drop the defensive check in 'repo_excludes_file()'.
All known test errors that occur *without* defensive checks are intercepted
by the 'repo != the_repository' check when checks *are there*, rather than
by the '!repo->initialized' check. In other words, the getter actually doesn't
need any checks added, because all of its calls are safe. We just need to
keep the check and the 'NEEDSWORK' comment *on the destructor* until
'repo_config_values()' eventually supports submodules, at which point we can
remove them.
THANKS!
Mentored-by: Christian Couder <christian.couder@gmail.com>
Mentored-by: Ayush Chandekar <ayu.chandekar@gmail.com>
Mentored-by: Olamide Caleb Bello <belkid98@gmail.com>
Signed-off-by: Tian Yuchen <cat@malon.dev>
Tian Yuchen (1):
environment: move excludes_file into repo_config_values
dir.c | 4 ++--
environment.c | 33 ++++++++++++++++++++++++++++++---
environment.h | 13 ++++++++++++-
repository.c | 1 +
4 files changed, 45 insertions(+), 6 deletions(-)
--
2.43.0
^ permalink raw reply
* Re: [GSoC] [Blog] week 5: Improving the new git repo command
From: K Jayatheerth @ 2026-07-01 17:50 UTC (permalink / raw)
To: GIT Mailing-list, Justin Tobler, Lucas Seiki Oshiro
In-Reply-To: <CA+rGoLdOjybHB7w1Wd0Or0wJUKjTOev7f1pZbj7dhAZRbs-2eg@mail.gmail.com>
Hi!
My Week 5 GSoC blog is live!
https://jayatheerth.com/blogs/gsoc/week-5
Feel free to give it a read and share any feedback ; )
Regards,
- K Jayatheerth
^ permalink raw reply
* Re: [PATCH v5 0/4] history: add squash subcommand to fold a range
From: Junio C Hamano @ 2026-07-01 17:41 UTC (permalink / raw)
To: Phillip Wood
Cc: Harald Nordgren, phillip.wood, Patrick Steinhardt,
Harald Nordgren via GitGitGadget, git
In-Reply-To: <c517bce2-9f39-46ec-8509-bb0893e26ae2@gmail.com>
Phillip Wood <phillip.wood123@gmail.com> writes:
> Yes - if you apply the way "rebase -i" works to multiple commits you can
> end up with a message template that has a screen full of commented lines
> between uncommitted parts of the message. See the example below from
> earlier in the thread. It is not so much of a problem in "rebase -i"
> because it only fixes up a single commit at a time so all the commented
> messages end up at the top of the buffer and at worst you have a few "#
> fixup! ..." or "# squash! ..." lines mixed in with the uncommitted text.
>
> # This is the combination of 4 commits
> # This is the first commit message
> Base subject
>
> Base body
>
> # This is the second commit message
> # Another subject
>
> # Another body
>
> # This is the third commit message
> # fixup! Base subject
>
> # This is the fourth commit message
> # amend! Another subject
> A better subject
>
> A better body
In the example, the second one becomes completely empty?
Is the proposal not to show any messages that will be discarded
anyway and not even show them in commented form? I think that makes
sense, and leaving only commit titles for these commits that would
not contribute to the text in the editor given to the user to edit
would indeed be an improvement. For the same reason, as "# amend!"
will replace the message wholesale, it would also be a good idea for
the first commit to be hidden like all the other commits that would
not contribute to the text, so an improved version of the above may
be:
# This is the combination fo 4 commits
# 1. Base subject
# 2. Another subject
# 3. fixup! Base subject
# 4. amend! Another subject
A better subject
A better body.
or something? Is that the direction you want us to take?
Thanks.
^ permalink raw reply
* Re: [PATCH 00/13] coverity: fix leaks and error paths
From: Junio C Hamano @ 2026-07-01 17:34 UTC (permalink / raw)
To: Johannes Schindelin via GitGitGadget; +Cc: git, Johannes Schindelin
In-Reply-To: <pull.2163.git.1782889472.gitgitgadget@gmail.com>
"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
writes:
> I wanted to whittle down the many issues reported by Coverity in the Git for
> Windows project. Turns out: The vast majority of the issues are false
> positives. Most of the remaining issues are in core Git proper.
I read through the series and did not see anything jumping at me as
wrong. Looking good. Will queue.
Thanks.
>
> This effort was forced on pause while Coverity was down from May 16
> [https://web.archive.org/web/20260516152422/https://scan.coverity.com/] to
> June 22
> [https://web.archive.org/web/20260622182153/https://scan.coverity.com/]).
>
> Here is a first batch of fixes for those issues.
>
> Johannes Schindelin (13):
> load_one_loose_object_map(): fix resource leak
> loose: avoid closing invalid fd on error path
> download_https_uri_to_file(): do not leak fd upon failure
> run-command: avoid close(-1) in start_command() error paths
> run_diff_files: avoid memory leak
> line-log: avoid redundant copy that leaks in process_ranges
> dir: free allocations on parse-error paths in read_one_dir()
> submodule: fix cwd leak in get_superproject_working_tree()
> worktree: fix resource leaks when branch creation fails
> imap-send: avoid leaking the IMAP upload buffer
> reftable/table: release filter on error path
> fsmonitor: plug token-data leak on early daemon-startup failures
> mingw: make exit_process() own the process handle on all paths
>
> builtin/fsmonitor--daemon.c | 2 ++
> builtin/worktree.c | 7 +++++--
> bundle-uri.c | 2 +-
> compat/mingw.c | 4 +---
> compat/win32/exit-process.h | 1 +
> diff-lib.c | 3 ++-
> dir.c | 9 +++++++--
> imap-send.c | 1 +
> line-log.c | 3 +--
> loose.c | 11 ++++++-----
> reftable/table.c | 4 ++++
> run-command.c | 6 +++---
> submodule.c | 8 ++++++--
> 13 files changed, 40 insertions(+), 21 deletions(-)
>
>
> base-commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2163%2Fdscho%2Fcoverity-fixes-leaks-and-error-paths-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2163/dscho/coverity-fixes-leaks-and-error-paths-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/2163
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox