Commit Graph

82576 Commits (jch)

Author SHA1 Message Date
Junio C Hamano 54bdcc24d0 Merge branch 'pw/stash-change-check-only-once' into jch
"git stash create/push" checked if there are checks that need to be
saved twice, which has been reduced to just once.

* pw/stash-change-check-only-once:
  stash push: remove duplicate changes detection
  stash create: remove duplicate changes detection
2026-10-12 09:26:02 -07:00
Junio C Hamano 95c2e70341 Merge branch 'ps/repo-ref-storage-format-fix' into jch
The output of 'git repo info' has been updated to use
'references.storageFormat' instead of 'references.format' for
consistency with recent ref-storage-format terminology updates.

* ps/repo-ref-storage-format-fix:
  builtin/repo: rename "references.format" to "references.storageFormat"
2026-10-12 09:26:02 -07:00
Junio C Hamano 6cac51c287 Merge branch 'pw/checkout-m-conflict-labels' into jch
When recreating a merge conflict using 'git checkout -m', the
original conflict labels (such as branch names) were lost and
replaced with generic ones.  The merge machinery has been updated to
record the original labels in '.git/MERGE_LABELS', allowing 'git
checkout -m' to restore them.

* pw/checkout-m-conflict-labels:
  merge: remember conflict labels
  remove_branch_state: convert boolean argument to flags
2026-10-12 09:26:01 -07:00
Junio C Hamano f54644fb48 Merge branch 'cc/lazy-fetch-trusted-bit' into jch
A new 'uploadpack.lazyFetchTrusted' configuration variable has been
introduced to allow 'upload-pack' to lazily fetch missing objects from
configured promisor remotes when serving trusted repositories.

* cc/lazy-fetch-trusted-bit:
  builtin/upload-pack: don't disable lazy fetching on trusted repo
  promisor-remote: prevent infinite recursion when lazy fetching
  upload-pack: read uploadpack.lazyFetchTrusted
  setup: extract path_allowlist_apply()
  promisor-remote: factor out lazy_fetch_objects()
2026-10-12 09:26:01 -07:00
Junio C Hamano 13a8d85591 Merge branch 'dm/libsecret-explicit-load' into jch
The 'libsecret' credential helper has been updated to explicitly
load secrets instead of relying on the search flag, preventing
assertion failures when items are concurrently deleted or locked.

* dm/libsecret-explicit-load:
  credential/libsecret: load secrets explicitly
2026-10-12 09:26:01 -07:00
Junio C Hamano d764fe85a8 Merge branch 'hn/range-diff-matched-only' into jch
The 'git range-diff' command has been augmented with a
'--matched-only' option to skip commits that are only present on
one side, allowing users to easily focus on only the commits that
have been retained.

* hn/range-diff-matched-only:
  range-diff: add --matched-only to skip one-sided commits
2026-10-12 09:26:01 -07:00
Junio C Hamano 05cd339d9f Merge branch 'pp/midx-write-skip-empty' into jch
The `git multi-pack-index write` command has been updated to
silently return success when there are no object entries to index.
This avoids writing empty `multi-pack-index` layers, which
previously caused subsequent incremental midx writes using the
`--bitmap` option to fail when attempting to load the missing
reverse index.

* pp/midx-write-skip-empty:
  midx-write: skip writes with no object entries
2026-10-12 09:26:01 -07:00
Junio C Hamano 875edb153b Merge branch 'dw/config-read-both-global' into jch
The 'git config --global' read operations have been updated to
respect both '$HOME/.gitconfig' and '$XDG_CONFIG_HOME/git/config',
fixing an inconsistency where only the former was read when both
configuration files are present.

* dw/config-read-both-global:
  config: read global scope via config_sequence
  t1300: test list with missing global config
2026-10-12 09:26:00 -07:00
Junio C Hamano dbbafcc1e8 Merge branch 'vv/branch-recurse-no-start-ref' into jch
The --recurse-submodules option in 'git branch' has been fixed to
avoid a crash when the start point is not a reference (e.g., a raw
object ID).  The creation path now skips setting up tracking and
properly forwards the absent tracking name to the submodule helper.

* vv/branch-recurse-no-start-ref:
  branch: allow recursion with no tracking name
  branch: do not track a start point with no ref
2026-10-12 09:26:00 -07:00
Junio C Hamano 26afc3a1c4 Merge branch 'ap/http-preserve-wwwauth-redirect' into jch
When an HTTP request triggers a redirect and the target yields an
authentication challenge, the WWW-Authenticate headers received
during the redirect are now explicitly preserved across the
credential URL update, fixing an issue where they were incorrectly
cleared.

* ap/http-preserve-wwwauth-redirect:
  http: preserve wwwauth_headers across redirects
2026-10-12 09:26:00 -07:00
Junio C Hamano 90b8e6887c Merge branch 'ij/subtree-reject-v2-config' into jch
The shell script implementation of 'git subtree' has been updated to
check for the presence of the configuration file of the new Rust
implementation, preventing users from accidentally running the old
script on repositories already managed by the new tool.

* ij/subtree-reject-v2-config:
  git-subtree: Bail out if we find output from Rust rewrite (test)
  git-subtree: Bail out if we find output from Rust rewrite
2026-10-12 09:26:00 -07:00
Junio C Hamano 391cc7b1d6 Merge branch 'ss/repack-drop-filtered-dry-run' into jch
The '--dry-run' option of 'git repack --drop-filtered' used to
actually rebuild packs and delete redundant ones, which has been
corrected to only list the candidates without making changes.

* ss/repack-drop-filtered-dry-run:
  repack: do not rebuild packs on --dry-run
2026-10-12 09:25:59 -07:00
Junio C Hamano 165dbeec57 Merge branch 'jk/test-lazy-prereq-heredoc' into jch
The lazy prerequisite set-up script can be fed as a here-doc, just
like test_expect_{success,failure} scripts these days.

* jk/test-lazy-prereq-heredoc:
  test-lib: allow lazy prerequisite snippets as here-docs
2026-10-12 09:25:59 -07:00
Junio C Hamano 86e590fda6 ### match next 2026-10-12 09:25:59 -07:00
Junio C Hamano 1b1908ea63 Merge branch 'hn/t7004-flaky-gpg-test-fix' into jch
The test for verifying a signed tag with a missing key has been
updated to point GNUPGHOME to an unused directory rather than
deleting the active gpghome directory, working around a flaky rm
failure caused by the background gpg-agent observed on Alpine.

* hn/t7004-flaky-gpg-test-fix:
  t7004: check a missing key without deleting gpghome
2026-10-12 09:25:59 -07:00
Junio C Hamano c3551fc217 Merge branch 'je/status-merge-specific-help' into jch
"git status" now suggests to use 'git merge --continue', not 'git commit',
when done with conflicts during a 'git merge'.

* je/status-merge-specific-help:
  status: suggest `git merge --continue`, not `git commit`
2026-10-12 09:25:59 -07:00
Junio C Hamano 8482e47bf9 Merge branch 'ps/odb-files-alternates' into jch
The odb_source API has been refactored to make alternates an
implementation detail of the files backend instead of managing them
at the core object database layer.

* ps/odb-files-alternates:
  odb/source: drop `read_alternates` callback
  odb/source-files: move alternates into the backend
  odb/source-files: extract reading alternates
  odb/source: make `will_destroy` an implementation detail
  tmp-objdir: replace primary source at creation time
  tmp-objdir: manage quarantine as an object directory
  tmp-objdir: absorb logic to set and restore primary sources
  odb/source-files: add the ability to have multiple object dirs
  odb: refactor `odb_find_source()` to yield dirs
  odb: refactor `odb_for_each_alternate()` to yield dirs
  odb/source-files: introduce `struct odb_files_dir`
  commit-graph: stop depending on `struct odb_source`
  commit-graph: require resolved packfile paths for `stdin_packs`
2026-10-12 09:25:59 -07:00
Junio C Hamano 74e856aa03 Merge branch 'kk/fetch-write-commit-graph-incremental' into jch
The fetch.writeCommitGraph behavior has been optimized to
incrementally update the commit graph using only the newly fetched
commits as seeds.  This avoids a full reachability scan of all
references and drastically reduces the post-fetch commit-graph
update time for repositories with many references.

* kk/fetch-write-commit-graph-incremental:
  fetch: write commit-graph using updated refs only
  test-tool read-graph: add commit-info subcommand
2026-10-12 09:25:58 -07:00
Junio C Hamano ff768ec7f8 Merge branch 'kn/packed-refs-verbatim-write' into jch
The routine that rewrites the packed-refs file has been optimized to
directly pass unmodified reference records verbatim to the output
via fwrite(3p), instead of redundantly re-formatting them with
fprintf(3p).

* kn/packed-refs-verbatim-write:
  packed-refs: use `fwrite()` when passing refs verbatim
2026-10-12 09:25:58 -07:00
Junio C Hamano e270f9147a Merge branch 'ch/fetch-followremotehead-lazy-validation' into jch
Validation of the 'fetch.followRemoteHEAD' configuration variable
has been deferred to when it is actually used, preventing irrelevant
warnings during 'git fetch' invocations that do not consult it.

* ch/fetch-followremotehead-lazy-validation:
  fetch.c: defer fetch.followRemoteHEAD validation
2026-10-12 09:25:58 -07:00
Junio C Hamano b59d45a334 Merge branch 'ps/packfile-stale-delta-base-cache-fix' into jch
Closing a packfile did not evict the entries belonging to it from
the delta base cache, which could lead to data corruption when a
newly allocated packfile happened to reuse the same memory address.
The cache eviction logic has been updated to remove these stale
entries upon closing a pack

* ps/packfile-stale-delta-base-cache-fix:
  packfile: fix corruption due to stale delta base cache entries
  packfile: move around `close_pack()`
2026-10-12 09:25:58 -07:00
Junio C Hamano 45279f83f2 Merge branch 'dk/fix-shattered-io-link' into jch
Replace a link to a site that disappeared with a link to web archive
of the last known good copy.

* dk/fix-shattered-io-link:
  doc: fix shattered.io link
2026-10-12 09:25:57 -07:00
Junio C Hamano 321deca512 Merge branch 'ma/t0450-use-test-path-is-file' into jch
A test script (t0450) has been updated to use the test_path_is_file
and test_path_is_missing helper functions, which provides better
diagnostic output on failure.

* ma/t0450-use-test-path-is-file:
  t0450: use test_path_is_file and test_path_is_missing
2026-10-12 09:25:57 -07:00
Junio C Hamano 312027cedb Merge branch 'je/doc-section-7-synopsis' into jch
The requirement for a 'SYNOPSIS' section in section 7 manual pages
has been relaxed by updating the linter script, and dummy
'SYNOPSIS' sections from existing section 7 documentation have been
removed to improve the rendered output

* je/doc-section-7-synopsis:
  doc: don't require a SYNOPSIS in section 7
2026-10-12 09:25:57 -07:00
Junio C Hamano 4199cc15ab Merge branch 'jk/t5551-test-shell-quote-fix' into jch
The shell quoting of a lazy prereq script was quoted incorrectly and
allowed variables dereferenced at the wrong moment, breaking the
curl version detection.

* jk/t5551-test-shell-quote-fix:
  t5551: fix quoting in curl version bug prereq
2026-10-12 09:25:57 -07:00
Junio C Hamano a00cbe05ee Merge branch 'tz/doc-override-less-env' into jch
The documentation for core.pager has been updated to provide
examples of overriding the LESS environment variable for custom
pagers by prefixing the pager command in the configuration.

* tz/doc-override-less-env:
  doc: add more examples of overriding LESS in core.pager
2026-10-12 09:25:57 -07:00
Junio C Hamano 6a15bd6c32 Merge branch 'gm/filter-branch-state-map-fix' into jch
The commit map populated from the state branch in 'git
filter-branch' has been corrected to parse the map using the
original-to-rewritten order.

* gm/filter-branch-state-map-fix:
  filter-branch: fix commit map init from state branch
2026-10-12 09:25:56 -07:00
Junio C Hamano 40d5c3c400 Merge branch 'pw/stash-all-parseopt-fix' into jch
Fix definition for the "--all" option to use symbolic constant
in the options[] array passed to parse_options API.

* pw/stash-all-parseopt-fix:
  stash: use named constant when parsing "--all"
2026-10-12 09:25:56 -07:00
Junio C Hamano 156e0b9b3f Merge branch 'kh/format-patch-range-diff-notes' into jch
The 'format-patch' command has been updated with options to
configure notes specifically for range-diff output, allowing them to
differ from the notes displayed on the patches themselves.

* kh/format-patch-range-diff-notes:
  format-patch: learn --[no-]range-diff-notes
  format-patch: simplify get_notes_arg parameters
2026-10-12 09:25:56 -07:00
Junio C Hamano 946cc1e50a Merge branch 'kh/doc-trailers-cmd-examples' into jch
The documentation for 'git interpret-trailers' has been updated to
fix the grammatical errors in the descriptions of command examples.

* kh/doc-trailers-cmd-examples:
  doc: interpret-trailers: fix cmd examples
2026-10-12 09:25:56 -07:00
Junio C Hamano c94cf16a9d Merge branch 'mg/doc-remote-set-head' into jch
The documentation for 'git remote set-head' has been updated to
clarify that it only modifies the local repository's remote-tracking
symbolic reference, and does not alter the target remote
repository's own 'HEAD'.

* mg/doc-remote-set-head:
  doc: remote: say that it only affects the local repository
2026-10-12 09:25:56 -07:00
Junio C Hamano 9c555f4ddb Merge branch 'kz/doc-user-manual-typo' into jch
A grammatically incorrect capitalization in user-manual.adoc has
been corrected.

* kz/doc-user-manual-typo:
  doc: fix typo in user manual
2026-10-12 09:25:55 -07:00
Junio C Hamano e1fde7a744 Merge branch 'ps/parse-options-subcommand-groups' into jch
The parse-options API has been updated to support grouping
subcommands, and the 'git refs' command has been updated to use this
new feature to categorize its subcommands in its help output.

* ps/parse-options-subcommand-groups:
  builtin/refs: introduce subcommand groups
  parse-options: allow grouping subcommands
  parse-options: extract functions to print single option
  parse-options: fix completion format when first option is skipped
2026-10-12 09:25:55 -07:00
Junio C Hamano 7efcccbfc5 Merge branch 'hn/object-name-push-short' into jch
The @{upstream} notation had short-hand @{u} from the beginning,
and @{push} learned corresponding @{p} to match.

* hn/object-name-push-short:
  object-name: accept @{p} as short for @{push}
2026-10-12 09:25:55 -07:00
Junio C Hamano 08fce9f716 Merge branch 'bc/git-contacts-stdin' into jch
The 'git-contacts' program (in contrib/) has been taught to read
patches from the standard input stream when an explicit dash ('-') is
passed in place of a file.

* bc/git-contacts-stdin:
  git-contacts: allow inputting patch via stdin
2026-10-12 09:25:55 -07:00
Junio C Hamano 69e5bf7be3 Merge branch 'ap/var-broken-down-idents' into jch
The 'git var' command has been updated to output individual components
of the author and committer identities, take multiple keys on the
command-line, and support NUL-delimited output with the '-z' option.

* ap/var-broken-down-idents:
  var: add broken-out identity variables
  var: accept more than one variable
  var: add "-z" output mode
  var: represent multi-valued variables with a string_list
2026-10-12 09:25:54 -07:00
Junio C Hamano 3d9b74f5aa Merge branch 'dk/stash-apply-index-incore' into jch
The handling of index conflicts in 'git stash apply --index' has
been optimized.  Instead of relying on expensive external
subprocesses using 'git diff-tree' and 'git apply', the index is now
merged in-core using the merge-ort machinery, which fixes a
concurrent lock file issue with autostash.

* dk/stash-apply-index-incore:
  builtin/stash: merge index in-core
  t3903: test failed "stash apply --index"
  stash: prepare merge options earlier
  builtin/stash: remove unused header
2026-10-12 09:25:54 -07:00
Junio C Hamano 13867e29bc Merge branch 'jk/xdiff-size_t' into jch
The internal diff and merge machinery has been updated to use
standard size_t types rather than signed longs for buffer
allocations and offsets, preventing subtle overflow issues on LLP64
architectures, and plugging uninitialized memory leaks along error
paths.

* jk/xdiff-size_t:
  merge-ll: report an error when reading external merge results fails
  merge-ll: handle external driver status before reading result
  merge-ll: use read_mmfile() to read external merge results
  xdiff: NUL-terminate buffers read by read_mmfile()
  xdiff: use size_t for buffer sizes
  xdiff: replace mmbuffer_t with mmfile_t
  xdiff: clean up read_mmfile() allocations on error
2026-10-12 09:25:54 -07:00
Junio C Hamano 6ca50a101f Merge branch 'ps/reftable-reflog-timezone' into jch
The internal representation of timezones in the reflog for the
reftable format has been fixed to match the specification, which
dictates an offset in minutes rather than the parsed "+HHMM" integer
representation.

* ps/reftable-reflog-timezone:
  refs/reftable: fix on-disk representation of reflog timezones
  t/helper: fix segfault in "dump-reftable -t"
  date: add helpers to convert between "+HHMM" timezones and minutes
2026-10-12 09:25:54 -07:00
Junio C Hamano 495804f19d Merge branch 'tb/t5520-reflog-expire' into jch
The `t5520` test script has been updated to disable reflog expiration.
This prevents test flakiness caused by the auto-maintenance
reflog-expire task, which would otherwise immediately expire the
test's reflogs due to them carrying hardcoded timestamps from 2005.

* tb/t5520-reflog-expire:
  t5520: don't expire reflogs where it matters
2026-10-12 09:25:53 -07:00
Junio C Hamano 3d148250f8 Merge branch 'td/ci-large-test-resources' into jch
CI resource exhaustion during test runs on GitHub Actions has been
mitigated by switching a comparison of a huge output to use a binary
comparison, and by capping the parallel jobs on Linux to the number
of available CPUs.

* td/ci-large-test-resources:
  ci: use twice the CPU count on both providers
  t4205: compare huge output without diff
2026-10-12 09:25:53 -07:00
Junio C Hamano 38b2676b76 Merge branch 'ps/meson-improvements' into jch
The build configurations for Meson have been optimized to avoid
recompiling HTTP sources multiple times and to utilize precompiled
headers for test-helpers and unit tests, reducing clean build times.
Additionally, the shell completion tests and GitLab CI MSVC runner
jobs have been fixed.

* ps/meson-improvements:
  gitlab-ci: fix hanging MSVC jobs
  meson: update wrappers
  meson: fix outdated completion helpers
  meson: use precompiled headers for unit tests
  meson: use precompiled headers for our test-helper
  meson: don't recompile git-remote-http(1) multiple times for tests
  meson: avoid recompiling HTTP sources several times
2026-10-12 09:25:53 -07:00
Siddharth Shrimali e33f507164 repack: do not rebuild packs on --dry-run
"git repack --drop-filtered --dry-run" is documented to list the
objects that would be dropped "without rebuilding any pack or
deleting anything", but it does both.

This is a bug in cmd_repack(): after printing the candidates, the
--dry-run block falls through into the regular repack code.
repack_promisor_objects() writes a new promisor pack, and with -d,
existing_packs_remove_redundant() deletes the old packs.

The existing guard only skips the implied "delete_redundant = 1", so
it does not stop an explicit -d, and it does not stop the new pack
from being written either.

This has been broken since --dry-run was introduced in 1e746b00aa
(builtin/repack: add --drop-filtered and --dry-run options,
2026-08-14).  The --dry-run block never returned early, so a dry run
has always gone on to do a regular repack.

Fix it by returning right after the candidates are listed, and add a
test that checks the pack directory is unchanged with and without -d.

Reported-by: Coy Geek <coygeek@gmail.com>
Helped-by: D. Ben Knoble <ben.knoble@gmail.com>
Signed-off-by: Siddharth Shrimali <r.siddharth.shrimali@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-12 07:45:40 -07:00
Julia Evans b6d18b5d68 status: suggest `git merge --continue`, not `git commit`
During a merge conflict, we suggest using --continue to continue the
merge for rebase, revert, and cherry-pick.

Change the `git merge` advice to be consistent. 367ff69428
(merge: add '--continue' option as a synonym for 'git commit', 2016-12-14)
says that `git merge --continue` is intended to be a synonym for
`git commit`, and the `git merge` man page already suggests to use
`git merge --continue`.

Signed-off-by: Julia Evans <julia@jvns.ca>
Acked-by: Phillip Wood <phillip.wood123@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-09 11:38:42 -07:00
Delilah Ashley Wu 844fb6da45 config: read global scope via config_sequence
When both `$HOME/.gitconfig` and `$XDG_CONFIG_HOME/git/config` exist,
`git config list --global` and `git config get --global` read the home
configuration file but ignore the XDG file. Bug reporters expected these
`--global` scoped commands to read both files [1][2], which would be
consistent with the documentation and the behaviour of the unscoped
variants. For example, `git config list` and `git config get` (without
`--global`) read from both files (in addition to system-wide and
repository-specific entries). We should address this inconsistency by
respecting both files during `--global` read operations.

The implementation assumes that each configuration scope corresponds to
a single file. So during `--global` read operations, Git selects one
file path to pass to `git_config_from_file_with_options(file)`. Because
the global scope can come from more than one file, we should use another
method to read the global configuration.

Since `git config list --show-scope --show-origin` reads both the home
and XDG files, there must be existing code that respects both locations,
namely `do_git_config_sequence()` which reads from all scopes. Introduce
an `ignore_system` flag and modify `git_config_system()` to respect it.
This makes `config_options` the primary way to disable parts of the
configuration sequence and allows callers of `do_git_config_sequence()`
to ignore all but the global scope (i.e. ignore system, local, worktree,
and cmdline). Reuse the function to read only the global scope when
`--global` is specified. This was the suggested solution [3] in the
original bug report [1].

The previous patch, "t1300: test list with missing global config",
recorded existing behaviour: when no global configuration file exists,
`git config list` should succeed whereas `git config list --global`
should fail. Since the configuration sequence gracefully ignores missing
global configuration files, track whether we successfully read at least
one of them and adjust the return code accordingly.

Keep populating `opts->source.file` in `builtin/config.c` as the
destination for write operations. Read operations use the configuration
sequence instead, which can be confusing. Add a comment to explain this
distinction.

Lastly, modify tests to check that both home and XDG configuration files
are respected during `--global` read operations.

[1] https://lore.kernel.org/git/CAFA9we-QLQRzJdGMMCPatmfrk1oHeiUu9msMRXXk1MLE5HRxBQ@mail.gmail.com/
[2] https://lore.kernel.org/git/CAAdFe9yhBk-WecVzCTsjQ-4Z3AZAbpP+w+B076ouM3qX6d1WAg@mail.gmail.com/
[3] https://lore.kernel.org/git/kl6ly1oze7wb.fsf@chooglen-macbookpro.roam.corp.google.com/

Reported-by: Jade Lovelace <lists@jade.fyi>
Reported-by: Nils Fahldieck <nils@fahldieck.de>
Suggested-by: Glen Choo <glencbz@gmail.com>
Helped-by: Derrick Stolee <stolee@gmail.com>
Helped-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Delilah Ashley Wu <delilahwu@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-09 07:37:34 -07:00
Delilah Ashley Wu 46a2c11f72 t1300: test list with missing global config
Record behaviour in two new tests: when no global configuration file
exists, `git config list` succeeds whereas `git config list --global`
fails. Only check the exit code, as we're not interested in the exact
error message.

This prevents regressions in the next patch, "config: read global scope
via config_sequence", which modifies `do_git_config_sequence()` to
optionally return a failure if no global configuration files were
successfully read (i.e. when the `--global` flag is specified).

Signed-off-by: Delilah Ashley Wu <delilahwu@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-09 07:37:34 -07:00
Phillip Wood 98684b7ce5 merge: remember conflict labels
When recreating merge conflicts with "git checkout -m <path>" the
original conflict labels are lost. For commands like "git merge" and
"git cherry-pick" we could use the presence of the related root
ref (MERGE_HEAD and CHERRY_PICK_HEAD respectively) to recreate the
labels. However, if the conflicts are from "git stash pop" or "git
checkout -m <branch>", then there is no ref to deduce the labels from. To
ensure the labels are always available, the merge machinery is updated to
write ".git/MERGE_LABELS" when it updates the worktree and
there are conflicts. The labels are then read from that file by "git
checkout -m <path>" when recreating the conflicts.

As "git checkout -m <branch>" calls remove_branch_state() which
ordinarily removes the labels file, we need to pass a flag down
to optionally prevent that so that the labels are available for any
subsequent "git checkout -m <path>". Note that merge_switch_to_result()
we assign "result->priv" to "opt->priv" and later clear "opt->priv" in
order to get a pointer to the private struct as result->priv is void*.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-09 07:35:53 -07:00
Phillip Wood 144d8e373f remove_branch_state: convert boolean argument to flags
Convert the "verbose" boolean argument to a flag so that we can add
more flags in a future commit.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-09 07:35:53 -07:00
Harald Nordgren b1be790f38 t7004: check a missing key without deleting gpghome
The "verify signed tag fails when public key is not present" test
deletes gpghome to lose the key, and this sometimes fails on Alpine
with

    rm: can't remove 'gpghome/S.gpg-agent.extra': No such file or directory

Point GNUPGHOME at an unused directory for the verification, which is
how t7510 checks a signature whose key is unknown.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-08 12:30:11 -07:00
Patrick Steinhardt 0ba59c8453 odb/source: drop `read_alternates` callback
Now that alternates are an implementation detail of the "files" backend
there is no reason anymore to expose them anywhere else. The callback to
read alternates is thus no longer required. Remove it.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-08 07:31:20 -07:00