Commit Graph

82386 Commits (a26ff4e576de7478e2fefd938bcc57951a2ffb0a)

Author SHA1 Message Date
Patrick Steinhardt a26ff4e576 tmp-objdir: replace primary source at creation time
When creating transactions via the "tmp-objdir" subsystem callers are
expected to first call `tmp_objdir_create()` to create the quarantine
directory and then `tmp_objdir_replace_primary_odb()` to activate that
quarantine directory as the primary object database source so that all
newly written objects are written into it.

This dance is performed by all users of temporary object directories, so
that makes the setup unnecessarily involved. Merge the logic to replace
the primary object database source into `tmp_objdir_create()` to
simplify the dance.

Note that with the quarantine directory being installed by
`tmp_objdir_create()`, users of this function no longer get a pointer to
the underlying quarantine directory. So instead of repreparing only that
directory, we now reprepare the whole source instead, and as we know
that the source has wired up the quarantine directory already, this will
cause us to reprepare the quarantine directory, too.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-08 07:31:19 -07:00
Patrick Steinhardt 622a625abb tmp-objdir: manage quarantine as an object directory
When creating a quarantine directory via the "tmp-objdir" subsystem we
create a new "files" backend that new objects part of the transaction
can be written to. In a future commit though we'll move handling of
alternates into the "files" backend, and as part of that it will no
longer be possible for us to have multiple sources attached to a single
object database.

In a preceding commit, we have prepared the "files" backend to be able
to handle multiple object directories. We don't use that mechanism for
alternates yet, but will start doing so in a subsequent commit. But with
that infrastructure ready we can already migrate tmp-objdirs over to use
this new mechanism.

Adapt the subsystem so we create a `struct odb_files_dir` instead of a
new "files" source.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-08 07:31:19 -07:00
Patrick Steinhardt f80a79e233 tmp-objdir: absorb logic to set and restore primary sources
The functions `odb_set_temporary_primary_source()` and
`odb_restore_primary_source()` can be used to adapt the primary object
database source. Nowadays though we only have a single user of this
subsystem left, which is the "tmp-objdir" subsystem.

Despite that, this functionality is also becoming less useful overall as
alternates are becoming an implementation detail of the "files" backend.
And with that change, there will only ever be a single source attached
to the object database anyway.

Move the logic into the "tmp-objdir" subsystem accordingly.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-08 07:31:19 -07:00
Patrick Steinhardt 5c869c96a4 odb/source-files: add the ability to have multiple object dirs
In a subsequent commit we'll migrate handling of alternates into the
"files" backend. As part of that, the backend will need to grow the
ability to handle multiple object directories for alternates and for
transactions.

Introduce a `struct odb_files_dir::next` pointer so that we can have
multiple directories. Adapt the backend to loop through this list as
necessary. In general:

  - For reading paths we will loop through all object directories until
    we have found the object.

  - For writing paths we will typically write to the first of our object
    directories.

This mechanism isn't used yet as we still only ever have a single object
directory at the current point in time. But that will change over
subsequent commits.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-08 07:31:19 -07:00
Patrick Steinhardt 4a9e8cab7d odb: refactor `odb_find_source()` to yield dirs
Similar as in the preceding commit, `odb_find_source()` can be used to
yield a single source by its object directory. This function is also
specific to the "files" backend once alternates are an implementation
detail thereof.

Refactor it to be specific to the "files" backend and return an `struct
odb_files_dir` to prepare for moving alternates into the "files" source.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-08 07:31:19 -07:00
Patrick Steinhardt 8db128e611 odb: refactor `odb_for_each_alternate()` to yield dirs
The function `odb_for_each_alternate()` iterates through all alternates
of an object database. This is becoming an implementation detail of the
"files" backend though, where each alternate will be represented by one
`struct odb_files_dir`.

Adapt `odb_for_each_alternate()` to already iterate through these
structs instead of iterating through sources.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-08 07:31:19 -07:00
Patrick Steinhardt 45b1324139 odb/source-files: introduce `struct odb_files_dir`
The "files" object database source consists of two separate backends for
storing loose and packed objects. These are managed as somewhat separate
entities even though they derive from the same object directory, whether
it's the primary object directory or that one from an alternate.

In a subsequent commit we'll move the handling of alternates into the
"files" backend completely so that it becomes another implementation
detail thereof. As part of this, we'll want to keep track of both of
these sub-sources as a single entity derived from their respective
object directory.

Prepare for this change by introducing a new `struct odb_files_dir` that
encapsulates them. For now, every "files" source has exactly one such
directory. In a subsequent commit though, we'll make it a linked list of
directories so that we can manage multiple such directories in a single
"files" source.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-08 07:31:18 -07:00
Patrick Steinhardt 623d2c7125 commit-graph: stop depending on `struct odb_source`
To read or write a commit graph we require access to the repository that
the graph should be read from or written for as well as the object
directory to derive its location. Instead of passing in these two bits
of information explicitly though, we pass in a `struct odb_source`,
which carries with it both of these pieces of information.

But ultimately, this is somewhat flawed as we now assume that the source
even has an on-disk representation, and furthermore we assume that the
commit graphs would live in ".git/objects/info". This is true for the
"files" backend, but it's not necessarily true for any other backend
that we may eventually want to introduce. So eventually, we'll want to
evolve the commit-graph subsystem to become agnostic of the backend's
layout and let the backend itself decide where to read a commit graph
from or where to write it to.

We're not there yet to do that switch, but the current design is already
causing issues for the intent of this patch series where we want to move
alternates into the "files" backend.

Convert the subsystem to take a repository plus an object directory path
instead. This unblocks moving around alternates, and it's also a step
in the right direction for moving commit graphs into the source in a
later series.

Note that we previously compared the `struct odb_source` pointers of two
commit graphs to figure out whether they were located in the same object
directory, whereas we now have to compare their paths. Callers may pass
in those paths in different forms though, for example relative to the
current working directory or as absolute paths. Convert the object
directory into an absolute path both when loading and when writing
commit graphs so that the comparisons become more robust.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-08 07:31:18 -07:00
Patrick Steinhardt 778d260c31 commit-graph: require resolved packfile paths for `stdin_packs`
Users can ask git-commit-graph(1) to write a commit graph specifically
for a set of packfiles via the "--stdin-packs" option. Those users are
expected to pass in relative paths, and those eventually get resolved in
`fill_oids_from_packs()`. This ties the logic in "commit-graph.c" to the
specific object database source, as the subsystem now needs to assume
where a specific packfile is located relative to the source itself.

Refactor the logic to instead require the caller to pass in resolved
packfiles to untangle that dependency. This also makes the next change
easier to implement, where we'll get rid of passing the source to the
commit-graph subsystem.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-08 07:31:18 -07:00
Junio C Hamano c46c1e3772 Start Git 2.98 cycle
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-10-01 11:28:16 -07:00
Junio C Hamano d1f22bfaec Merge branch 'dk/use-nsec-runtime'
The build-time knob 'USE_NSEC' for nanosecond stat precision has been
converted to a runtime configuration 'core.useNanosec', allowing
distributions to bundle one binary that adapts to filesystem
capabilities dynamically.

* dk/use-nsec-runtime:
  core: convert build-time USE_NSEC into runtime core.useNanosec
  environment: align repo_config_values_init with struct declaration
  meson: expose knob for xmlto relative links in manuals
2026-10-01 11:26:41 -07:00
Junio C Hamano 2f28db44d5 Merge branch 'ps/ref-storage-format'
The terminology regarding reference storage formats has been unified
across command-line options, environment variables, configuration
variables, and source code, standardizing on the phrase "ref storage
format" (e.g., `--ref-storage-format`, `'GIT_REF_STORAGE_FORMAT'`).
Additionally, the `--ref-storage-format` option has been updated to
accept payloads in the form `<format>://<payload>`.

* ps/ref-storage-format:
  setup: allow "--ref-storage-format=" to specify a payload
  setup: rename "init.defaultRefFormat" to "init.defaultRefStorageFormat"
  t: rename GIT_TEST_DEFAULT_REF_FORMAT
  setup: rename ref storage format environment variables
  setup: refactor how we configure the ref storage format
  refs: expose function to parse reference URIs
  help: rename "default-ref-format" to "default-ref-storage-format"
  builtin/rev-parse: rename "--show-ref-format" to "--show-ref-storage-format"
  builtin/submodule: rename "--ref-format=" to "--ref-storage-format="
  builtin/refs: rename "--ref-format=" to "--ref-storage-format="
  builtin/clone: rename "--ref-format=" to "--ref-storage-format="
  builtin/init: rename "--ref-format=" to "--ref-storage-format="
  parse-options: allow for hidden aliases
2026-10-01 11:26:40 -07:00
Junio C Hamano 6b204dc724 Merge branch 'ak/refs-files-root-ref-lock'
The files backend has been updated to avoid unconditionally locking
the 'packed-refs' file when deleting a root ref (which are never
packed).

* ak/refs-files-root-ref-lock:
  refs/files: avoid packed-refs lock for root ref deletion
2026-10-01 11:26:40 -07:00
Junio C Hamano d08565d2c6 Merge branch 'jc/cocci-free-updates'
Updates to Coccinelle semantic patches to correctly handle the
'FREE_AND_NULL()' macro and avoid generating broken transformations
for negated pointer checks.

* jc/cocci-free-updates:
  cocci: FREE_AND_NULL(E) is safe to call on NULL
  cocci: remove risky "if (!E) free(E)" conversion
2026-10-01 11:26:40 -07:00
Junio C Hamano 875fa34e94 Merge branch 'kn/receive-report-hook'
A new hook 'report' is added to 'git receive-pack', which runs after
reference updates and allows the server to filter or modify the
packet-line status report sent back to the client.

* kn/receive-report-hook:
  receive-pack: coccinelle fix
  hook: introduce the receive-report hook
  receive-pack: move message generation to separate function
  receive-pack: drop static variables to track report status version
  doc: add proc-receive hook info in 'git-receive-pack.adoc'
2026-10-01 11:26:39 -07:00
Junio C Hamano 5cfa270bc4 Merge branch 'hn/history-squash'
The experimental 'git history' command has been taught a new 'squash'
subcommand to fold a range of commits into a single commit, with any
descendants replayed on top.

* hn/history-squash:
  history: support editing squashed commit messages
  history: create squashed commits without editing
  history: protect branches when squashing a range
  history: validate squash revision ranges
  history: add skeleton for squash subcommand
  sequencer: share the squash message marker helpers and flags
  history: give commit_tree_ext a message template
  history: extract helper for a commit's parent tree
2026-10-01 11:26:39 -07:00
Junio C Hamano 106bdd26a0 Merge branch 'ps/odb-alternates-at-creation'
The setup of alternates has been deferred to object database
creation time during clone, which drops the unused ad-hoc alternate
writing API, simplifying the object database backend interface.

* ps/odb-alternates-at-creation:
  odb/source: remove the ability to write alternates
  builtin/clone: write alternates via `odb_create_on_disk()`
  odb/source: support writing alternates when creating the database
  builtin/clone: move setup of alternates for non-shared local clones
  builtin/clone: move setup of alternates for shared local clones
  builtin/clone: refactor handling of "--reference{,-if-able}"
  builtin/clone: move around `setup_reference()`
  builtin/clone: defer setup of the object database
  setup: split up concerns of `init_db()`
2026-10-01 11:26:39 -07:00
Junio C Hamano a018953688 Git 2.56
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-09-27 21:20:04 -07:00
Junio C Hamano 34f06850c1 l10n-2.56.0-v1
-----BEGIN PGP SIGNATURE-----
 
 iQJPBAABCAA5FiEE37vMEzKDqYvVxs51k24VDd1FMtUFAmq5EJkbFIAAAAAABAAO
 bWFudTIsMi41KzEuMTIsMCwzAAoJEJNuFQ3dRTLVNygQAKBKbnyl5/UZGGhbkWTU
 p86/q4gBVmI+icmE8Zx4RfP3KTjTNP5ajPVgF92MUt1WjK4r6lmNQT9GbQa/BfP0
 L2ZX5z2irN1GwnrUuWTD4/gSlO3vj2B3yFZPjMg4EYK9ba0PwSew5X5lbyYM67O5
 r4roOLO3NkLY/nrLMfxMqrWJGfRt+XP7yqvLwdpc6Nft/SrhM4WerTxXKkW0nqcx
 0EHqgx5a201UX434qGKKCUOpH+oYZoZ6IldstzDsd46GaWEKoIAiUy52A/UWF+wN
 +rWNBB9VDspb4rwVeJlY4mNbHChfkycWFXt+XTjU/+f7zAMCsEHK64AR/yWBjq7/
 6NbHZnOI1jh0sARewzJT7EVEzhk+yC1qTnqllkSp3vijemVJ2KU8VmBJPnk8lIPQ
 rHCbmuAdkBxtDXNogSN9WimTF0V9tXcEf7VG6n2T0xFqM71mvTQmZ+MghD0Vre+L
 MQotkqmpxk+hkTi395M/08tOTR0aNbrMzKFe6hvxd1WL4BM8FUwDQSd2nY20udlY
 nZlIuxrGfgKvdxI+/GtZekzwOiKVk0MfB3MJfrfLtd0MHGo0eGh4PaawH/oR+1ak
 u2abcrut88q29xi8nu0Fq0e8zJojUoZKRO/AWhDXoIVNM2yK7vHNJbfxZGeT6IZ6
 wAsUsuLZBgL9mXvsXDl5F25e
 =rheU
 -----END PGP SIGNATURE-----

Merge tag 'l10n-2.56.0-v1' of https://github.com/git-l10n/git-po

l10n-2.56.0-v1

* tag 'l10n-2.56.0-v1' of https://github.com/git-l10n/git-po:
  l10n: af: fix review comments
  l10n: af: add Afrikaans translation
  l10n: pt_BR: add Brazilian Portuguese translation
  l10n: restore translations after upstream revert
  l10n: uk: add 2.56 translation
  l10n: Update Catalan Translation
  l10n: zh_CN: adopt review suggestions
  l10n: zh_CN: updated translation for 2.56
  l10n: ga.po: update for Git 2.56
  l10n: tr: Update Turkish translations
  l10n: fr: update translation for git 2.56.0
  l10n: sv.po: Update Swedish translation
  l10n: po-id for 2.56
  l10n: AGENTS.md: zsh-safe review result cleanup
  l10n: AGENTS.md: use JSON intermediates in workflow
  l10n: AGENTS.md: count PO entries with git-po-helper stat -c
  l10n: AGENTS.md: require git-po-helper >= 0.9.1
  l10n: AGENTS.md: fix counter fallbacks
2026-09-27 12:33:43 -07:00
Stéfan Driaan Turvey 14a748f852 l10n: af: fix review comments
Signed-off-by: Stéfan Driaan Turvey <stefanturvey1912@gmail.com>
2026-09-27 20:41:50 +08:00
Stéfan Driaan Turvey 0ce24c2cb2 l10n: af: add Afrikaans translation
Add a full Afrikaans translation of Git (6476 messages) and
register the Afrikaans team in po/TEAMS.

Signed-off-by: Stéfan Driaan Turvey <stefanturvey1912@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2026-09-27 20:41:48 +08:00
Daniel Pereira bc312c315c l10n: pt_BR: add Brazilian Portuguese translation
Add the initial Brazilian Portuguese translation of Git and register
the language team in po/TEAMS.

All 6476 messages are translated against the git.pot for v2.56.0-rc1.
The file header carries a glossary documenting the terminology in use:
Git command and concept names (branch, commit, merge, rebase, checkout,
push, fetch, stash, tag, pack, worktree, ...) are kept in English while
the surrounding prose is translated, and literal configuration values
and command-line options are never translated.

Signed-off-by: Daniel Pereira <danielmaraboo@gmail.com>
Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2026-09-27 20:18:53 +08:00
Jiang Xin 0a961ebf01 l10n: restore translations after upstream revert
Restore translations for the new translatable strings reintroduced by
commit 0f8e75abeb (Revert "Merge branch 'en/no-amend-during-conflicts'",
2026-09-23).

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2026-09-27 17:12:12 +08:00
Arkadii Yakovets a2a8f6ba37 l10n: uk: add 2.56 translation
Co-authored-by: Kate Golovanova <kate@kgthreads.com>
Signed-off-by: Arkadii Yakovets <2201626+arkid15r@users.noreply.github.com>
Signed-off-by: Kate Golovanova <kate@kgthreads.com>
2026-09-27 17:09:37 +08:00
Mikel Forcada f7dcca73f3 l10n: Update Catalan Translation
Signed-off-by: Mikel Forcada <mikel.forcada@gmail.com>
2026-09-27 17:09:37 +08:00
lilydjwg baa20f2c7c l10n: zh_CN: adopt review suggestions
Signed-off-by: lilydjwg <lilydjwg@gmail.com>
2026-09-27 17:09:37 +08:00
lilydjwg 2e3e58a51d l10n: zh_CN: updated translation for 2.56
Signed-off-by: lilydjwg <lilydjwg@gmail.com>
2026-09-27 17:09:37 +08:00
Aindriú Mac Giolla Eoin e051aa97dc l10n: ga.po: update for Git 2.56
Signed-off-by: Aindriú Mac Giolla Eoin <aindriu80@gmail.com>
2026-09-27 17:09:37 +08:00
Emir SARI d4586f38f7 l10n: tr: Update Turkish translations
Signed-off-by: Emir SARI <emir_sari@icloud.com>
2026-09-27 17:09:37 +08:00
Jean-Noël Avila 334a9a3867 l10n: fr: update translation for git 2.56.0
Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
2026-09-27 17:09:37 +08:00
Peter Krefting 4805c1ff99 l10n: sv.po: Update Swedish translation
Signed-off-by: Peter Krefting <peter@softwolves.pp.se>
Reviewed-by: Tuomas Ahola <taahol@utu.fi>
Reviewed-by: AI, by way of Jiang Xin <worldhello.net@gmail.com>
2026-09-27 17:09:37 +08:00
Bagas Sanjaya 8f3ec9333f l10n: po-id for 2.56
Update following components:

  * bisect.c
  * builtin/add.c
  * builtin/bisect.c
  * builtin/branch.c
  * builtin/cat-file.c
  * builtin/checkout.c
  * builtin/commit.c
  * builtin/diff.c
  * builtin/fast-export.c
  * builtin/fast-import.c
  * builtin/fetch.c
  * builtin/history.c
  * builtin/multi-pack-index.c
  * builtin/mv.c
  * builtin/push.c
  * builtin/refs.c
  * builtin/repack.c
  * builtin/replay.c
  * builtin/repo.c
  * builtin/rev-list.c
  * builtin/worktree.c
  * bundle-uri.c
  * command-list.h
  * diff.c
  * git.c
  * imap-send.c
  * list-objects-filter.c
  * merge-ort.c
  * object-file.c
  * pack-bitmap.c
  * promisor-remote.c
  * remote.c
  * replay.c
  * setup.c
  * sequencer.c
  * transport-helper.c
  * usage.c
  * git-send-email.perl

Translate following new components:

  * commit-reach.c
  * fetch-object-info.c
  * odb.c
  * odb/source-files.c
  * odb/transaction.c
  * odb/transaction.h

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
2026-09-27 17:09:37 +08:00
Jiang Xin 54c2884e8b l10n: AGENTS.md: zsh-safe review result cleanup
The review_one_batch() function cleans up stale po/review-result*.json
files before starting a new review. On zsh, an unmatched glob causes a
"no matches found" error and aborts the command, because NOMATCH is on
by default.

Fix by enabling null_glob locally when running under zsh. This leaves
bash and other POSIX shells unaffected, since $ZSH_VERSION is unset
there.

Only the cleanup step in review_one_batch() is changed; no other
behavior is affected.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2026-09-27 15:57:52 +08:00
Jiang Xin ab902cf3aa l10n: AGENTS.md: use JSON intermediates in workflow
Make/l10n compiles every po/*.po file. The AGENTS.md workflow keeps its
intermediate files in po/, so any .po file written there can be picked
up by a normal `make` run and cause build failures. Switch the workflow
to use GETTEXT JSON for pending/input/review work files instead of PO,
and rename the remaining PO scratch file to l10n-done.po.tmp so
Make/l10n ignores it.

This only affects the helper scripts documented in po/AGENTS.md.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2026-09-27 15:57:52 +08:00
Jiang Xin 312e271fcb l10n: AGENTS.md: count PO entries with git-po-helper stat -c
grep -c on msgid lines only works for PO text, not GETTEXT JSON. When
workflow intermediates move from PO to JSON, that count breaks. Use
stat -c instead; it also excludes the header, so ENTRY_COUNT - 1 is
unnecessary.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2026-09-27 15:57:52 +08:00
Jiang Xin b2bc011edd l10n: AGENTS.md: require git-po-helper >= 0.9.1
Task 3 claimed a gettext-only fallback, but validation already needs
git-po-helper, and the awk|tac batch path fails on systems without tac.
Require the helper for Tasks 3 and 4, drop the unused msgattrib/PO
paths, and point agents at msg-select (with msgattrib still noted as an
option).

Pin to git-po-helper >= 0.9.1 to rely on new helper features: version
comparison for the minimum version check, and `git-po-helper stat -c`
used by the next commit to count PO entries.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2026-09-27 15:57:51 +08:00
Jiang Xin b758bc5bc4 l10n: AGENTS.md: fix counter fallbacks
Reading a counter with "cmd || echo 0" breaks whenever the command
writes output but still exits non-zero. On zero matches, "grep -c"
prints 0 and exits with status 1, so the command substitution
captured two zeros and the arithmetic that follows failed with a
syntax error instead of evaluating to 0.

Fix by ignoring the exit status with "|| true" and defaulting the
empty value with "${VAR:-0}". Apply this to ENTRY_COUNT in both
l10n_one_batch() and review_one_batch(), and to the BATCH counter
read from po/review-batch.txt, which used the same fragile fallback.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
2026-09-27 15:57:51 +08:00
Junio C Hamano 0f8e75abeb Revert "Merge branch 'en/no-amend-during-conflicts'"
This reverts commit a334b7ec86,
reversing changes made to cee3798cb4,
as we found a regression and decided to give ourselves a chance to
fix it better after Git 2.56 final.

  cf. https://lore.kernel.org/git/xmqqik3vc1pc.fsf@gitster.g/
2026-09-23 11:18:51 -07:00
Junio C Hamano 3bc0341126 Git 2.56-rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-09-22 05:36:33 -07:00
Junio C Hamano d38352cd43 A few more fixes before -rc2
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-09-17 09:48:17 -07:00
Junio C Hamano 3bbf43483e Merge branch 'yt/pathspec-negative-prefix'
The pathspec matching logic has been updated to avoid out-of-bounds
memory accesses when a negative pathspec is shorter than the common
prefix of positive pathspecs.

* yt/pathspec-negative-prefix:
  dir: preserve pathspec prefix optimization with leading excludes
  dir: do not apply prefix to negative pathspecs
2026-09-17 09:48:17 -07:00
Junio C Hamano 2a41443dc8 Merge branch 'tz/doc-pack-refs-and-refs-fixes'
Doc updates.

* tz/doc-pack-refs-and-refs-fixes:
  doc/refs: backtick-quote commands and options consistently
  doc/pack-refs: convert synopsis and options to new style
2026-09-17 09:48:17 -07:00
Yoichi NAKAYAMA 7b58375ab3 mailmap: normalize name for Yoichi NAKAYAMA
Normalize name formatting and map older formats to the canonical one.

Signed-off-by: Yoichi NAKAYAMA <yoichi.nakayama@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-09-17 09:43:13 -07:00
Junio C Hamano 12cb6293d6 Git 2.56-rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-09-16 09:07:56 -07:00
Junio C Hamano d306f3f0d5 Merge branch 'ks/history-commit-leakfix'
The memory leak caused by not unusing the commit buffer returned by
repo_logmsg_reencode() during the rewording operation in 'git
history' has been plugged.

* ks/history-commit-leakfix:
  builtin/history: unuse the commit buffer after use
2026-09-16 09:04:56 -07:00
Junio C Hamano b6a7e39a8c Merge branch 'jc/rust-cargo-build-target'
When cross-compiling with Cargo, the output artifact is placed in a
target-specific subdirectory, which causes the build system to fail
to locate it.  The build system has been updated to respect the
'CARGO_BUILD_TARGET' environment variable.

* jc/rust-cargo-build-target:
  rust: respect CARGO_BUILD_TARGET when locating build output
2026-09-16 09:04:55 -07:00
Junio C Hamano 3a055174da Merge branch 'js/rust-in-windows-ci'
Update Windows CI build to support Rust.

* js/rust-in-windows-ci:
  ci(windows): build with Rust
  rust: pick a GCC-compatible Cargo target under MSYS2/MinGW
2026-09-16 09:04:55 -07:00
Junio C Hamano f0ef1b96a0 4th batch for -rc1
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-09-15 11:07:37 -07:00
Junio C Hamano 14bf3a43f8 Merge branch 'ps/odb-pluggable-fsck'
The consistency checks for the object database (fsck) have been
decoupled from the generic builtin implementation and moved into the
backend-specific object source layers, making them pluggable for
different object storage formats.

* ps/odb-pluggable-fsck:
  builtin/fsck: move loose object verification into the loose source
  builtin/fsck: move multi-pack index verification into the packed source
  builtin/fsck: move bitmap verification into the packed source
  builtin/fsck: move reverse index verification into the packed source
  builtin/fsck: move packfile verification into the packed source
  odb: provide infrastructure for pluggable fsck checks
  builtin/fsck: don't check alternates with "--no-full"
  builtin/fsck: de-globalize option handling
  builtin/fsck: merge `fsck_obj_buffer()` and `fsck_obj()`
  builtin/fsck: use `fsck_obj_buffer()` when checking loose objects
2026-09-15 11:07:37 -07:00
Junio C Hamano 4ee3b87aaa Merge branch 'ps/odb-stop-registering-in-memory-sources'
The mechanism to register in-memory alternate object sources has
been removed, as submodule object databases are now accessed
natively via their own repository structures.  This simplifies
object database management and prepares the codebase for migrating
alternate tracking into the files backend.

* ps/odb-stop-registering-in-memory-sources:
  odb: remove the ability to link sources ad-hoc
  t/helper: stop registering alternates in "ref-store" command
  t/helper: adapt read-midx to not link ad-hoc source anymore
  builtin/multi-pack-index: refuse unknown sources with "--object-dir="
  odb/packed: fix memory leaks when freeing source
  tmp-objdir: drop unused function to register alternate
  odb: remove infrastructure to register submodule sources
  builtin/grep: stop registering submodule ODB as source
  submodule-config: stop registering submodule sources
  submodule-config: stop using `the_hash_algo`
  submodule-config: remove uses of `the_repository`
  cache-tree: remove dependency on `the_repository`
  cache-tree: drop `the_repository` in `cache_tree_fully_valid()`
2026-09-15 11:07:36 -07:00