From a12382f99488b8cea82f59a310084e43ff84e99b Mon Sep 17 00:00:00 2001 From: Jeff King Date: Thu, 16 Apr 2026 16:06:59 -0400 Subject: [PATCH 1/7] MIDX: revert the default version to v1 We introduced midx version 2 in b2ec8e90c2 (midx: do not require packs to be sorted in lexicographic order, 2026-02-24) and now write it by default. The rationale was that older versions should ignore the v2 midx and fall back to using the packs (just like we do for other midx errors). Unfortunately this is not the case, as we have a hard die() when we see an unknown midx version. As a result, writing a midx with Git 2.54-rc2 puts the repository into a state that is unusable with Git 2.53. And this midx write may happen behind the scenes as part of normal operations, like fetch. Let's switch back to writing v1 by default to avoid regressing the case where multiple versions of Git are used on the same repository. There is one gotcha, though: the v2 format is required for some new features, like midx compaction, and running "git multi-pack-index compact" will complain when asked to write a v1 index. The user must set midx.version to "2" to make the feature work. So instead of always using v1, we'll base the default on whether the requested feature requires v2. That does mean that running midx compaction will create a repository that can't be read by older versions of Git. But we never do that by default; only people experimenting with the new feature will be affected. We have to adjust the test expectation in t5319, since it will now generate v1 files. And our "auto-select v2" is covered by the tests in t5335, which continue to check that compaction works without having to set midx.version manually (and also explicitly check that asking for v1 with compaction reports the problem). Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/git-multi-pack-index.adoc | 3 +++ midx-write.c | 4 +++- t/t5319-multi-pack-index.sh | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/git-multi-pack-index.adoc b/Documentation/git-multi-pack-index.adoc index 612568301412d6..3a5aa227784071 100644 --- a/Documentation/git-multi-pack-index.adoc +++ b/Documentation/git-multi-pack-index.adoc @@ -98,6 +98,9 @@ compact:: --[no-]bitmap:: Control whether or not a multi-pack bitmap is written. -- ++ +Note that the compact command requires writing a version-2 midx that +cannot be read by versions of Git prior to v2.54. verify:: Verify the contents of the MIDX file. diff --git a/midx-write.c b/midx-write.c index 0ff2e45aa7abdd..a25cab75abad11 100644 --- a/midx-write.c +++ b/midx-write.c @@ -1259,7 +1259,6 @@ static int write_midx_internal(struct write_midx_opts *opts) struct tempfile *incr; struct write_midx_context ctx = { .preferred_pack_idx = NO_PREFERRED_PACK, - .version = MIDX_VERSION_V2, }; struct multi_pack_index *midx_to_free = NULL; int bitmapped_packs_concat_len = 0; @@ -1275,6 +1274,9 @@ static int write_midx_internal(struct write_midx_opts *opts) ctx.repo = r; ctx.source = opts->source; + ctx.version = ((opts->flags & MIDX_WRITE_COMPACT) + ? MIDX_VERSION_V2 + : MIDX_VERSION_V1); repo_config_get_int(ctx.repo, "midx.version", &ctx.version); if (ctx.version != MIDX_VERSION_V1 && ctx.version != MIDX_VERSION_V2) die(_("unknown MIDX version: %d"), ctx.version); diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh index 58e0b685b105f5..fa0d4046f753b8 100755 --- a/t/t5319-multi-pack-index.sh +++ b/t/t5319-multi-pack-index.sh @@ -21,7 +21,7 @@ midx_read_expect () { EXTRA_CHUNKS="$5" { cat <<-EOF && - header: 4d494458 2 $HASH_LEN $NUM_CHUNKS $NUM_PACKS + header: 4d494458 1 $HASH_LEN $NUM_CHUNKS $NUM_PACKS chunks: pack-names oid-fanout oid-lookup object-offsets$EXTRA_CHUNKS num_objects: $NUM_OBJECTS packs: From 96a659da8a211a2eb8246f225db3c50a15017e68 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Thu, 16 Apr 2026 23:36:26 +0000 Subject: [PATCH 2/7] RelNotes/2.54.0: fix typos and grammar Fix various issues in the release notes -- missing/wrong articles, typo, indentation, quote consistency, and wording improvement or corrections. Other than the indentation fix for "The way combined list-object filter options...", this patch is much easier to view with --color-words. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- Documentation/RelNotes/2.54.0.adoc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Documentation/RelNotes/2.54.0.adoc b/Documentation/RelNotes/2.54.0.adoc index 2ad73ff4737e7f..7bfc351c9a2dd6 100644 --- a/Documentation/RelNotes/2.54.0.adoc +++ b/Documentation/RelNotes/2.54.0.adoc @@ -36,7 +36,7 @@ UI, Workflows & Features * Extend the alias configuration syntax to allow aliases using characters outside ASCII alphanumeric (plus '-'). - * A signature on a commit that was GPG signed long time ago ought to + * A signature on a commit that was GPG signed a long time ago ought to be still valid after the key that was used to sign it has expired, but we showed them in alarming red. @@ -88,7 +88,7 @@ UI, Workflows & Features * "git repo structure" command learns to report maximum values on various aspects of objects it inspects. - * "git rebase" learns "--trailer" command to drive the + * "git rebase" learns "--trailer" option to drive the interpret-trailers machinery. * "git fast-import" learned to optionally replace signature on @@ -119,7 +119,7 @@ UI, Workflows & Features * "git replay" (experimental) learns, in addition to "pick" and "replay", a new operating mode "revert". - * git replay now supports replaying down to the root commit. + * "git replay" now supports replaying down to the root commit. * Handling of signed commits and tags in fast-import has been made more configurable. @@ -207,7 +207,7 @@ Performance, Internal Implementation, Development Support etc. from getting added. * The core.attributesfile is intended to be set per repository, but - were kept track of by a single global variable in-core, which has + was kept track of by a single global variable in-core, which has been corrected by moving it to per-repository data structure. * Use the hook API to replace ad-hoc invocation of hook scripts via @@ -232,8 +232,8 @@ Performance, Internal Implementation, Development Support etc. * Reduce dependence on the global the_hash_algo and the_repository variables of wt-status code path. - * The way combined list-object filter options are parsed has been - revamped. + * The way combined list-object filter options are parsed has been + revamped. * Editorconfig filename patterns were specified incorrectly, making many source files inside subdirectories unaffected, which has been @@ -272,7 +272,7 @@ Performance, Internal Implementation, Development Support etc. * split-index.c has been updated to not use the global the_repository and the_hash_algo variables. - * The unsigned integer that is used as an bitset to specify the kind + * The unsigned integer that is used as a bitset to specify the kind of branches interpret_branch_name() function has been changed to use a dedicated enum type. @@ -282,7 +282,7 @@ Performance, Internal Implementation, Development Support etc. * Code paths that loop over another array to push each element into a strvec have been rewritten to use strvec_pushv() instead. - * In case homebrew breaks REG_ENHANCED again, leave a in-code comment + * In case homebrew breaks REG_ENHANCED again, leave an in-code comment to suggest use of our replacement regex as a workaround. * MinGW build updates. @@ -382,7 +382,7 @@ Fixes since v2.53 (merge f4eff7116d ps/pack-concat-wo-backfill later to maint). * "git switch ", in an attempt to create a local branch - after a remote tracking branch of the same name gave an advise + after a remote tracking branch of the same name gave an advice message to disambiguate using "git checkout", which has been updated to use "git switch". (merge 12fee11f21 jc/checkout-switch-restore later to maint). @@ -396,7 +396,7 @@ Fixes since v2.53 * "git format-patch --from=" did not honor the command line option when writing out the cover letter, which has been corrected. - * Update build precedure for mergetool documentation in meson-based builds. + * Update build procedure for mergetool documentation in meson-based builds. (merge 58e4eeeeb5 pw/meson-doc-mergetool later to maint). * An earlier attempt to optimize "git subtree" discarded too much From 39901e77d4543bdc30d6967ea0d162886b7d0fb0 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Thu, 16 Apr 2026 23:36:27 +0000 Subject: [PATCH 3/7] CodingGuidelines: fix subject-verb agreement Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- Documentation/CodingGuidelines | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index 4992e52093efdc..2aafcec40dc0c2 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -688,7 +688,7 @@ For C programs: walk_dog(dog[1]); Cases where the array is employed as a whole rather than as its unit parts, - the plural forms is preferable. E.g: + the plural form is preferable. E.g: char *dogs[] = ...; walk_all_dogs(dogs); From 8ecf2a192acd73112341a7b03a3803635c4f49ae Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Thu, 16 Apr 2026 23:36:28 +0000 Subject: [PATCH 4/7] doc: fix self-referential config in sendemail.smtpSSLClientKey a8215a205141 (send-email: add client certificate options, 2026-03-02) added documentation for sendemail.smtpSSLClientKey that says it works "in conjunction with `sendemail.smtpSSLClientKey`" -- referring to itself. It appears that `sendemail.smtpSSLClientCert` was the intended reference; fix it. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- Documentation/config/sendemail.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/config/sendemail.adoc b/Documentation/config/sendemail.adoc index 6560ecc5abe409..1d700559b4a4c3 100644 --- a/Documentation/config/sendemail.adoc +++ b/Documentation/config/sendemail.adoc @@ -22,7 +22,7 @@ sendemail.smtpSSLClientCert:: sendemail.smtpSSLClientKey:: Path to the client private key file that corresponds to the client certificate. To avoid misconfiguration, this configuration must be used - in conjunction with `sendemail.smtpSSLClientKey` or the + in conjunction with `sendemail.smtpSSLClientCert` or the `--smtp-ssl-client-cert` option. If the client key is included in the client certificate, the choice of private key depends on the format of the certificate. Visit https://metacpan.org/pod/IO::Socket::SSL for more From 31f23c958be7f727ece4ce0db8b7ddbf1dfb3f79 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Thu, 16 Apr 2026 23:36:29 +0000 Subject: [PATCH 5/7] doc: fix plural agreement in pack.preferBitmapTips hierarchies -> hierarchy Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- Documentation/config/pack.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/config/pack.adoc b/Documentation/config/pack.adoc index fa997c8597d5bd..22384c2d2f0773 100644 --- a/Documentation/config/pack.adoc +++ b/Documentation/config/pack.adoc @@ -161,7 +161,7 @@ pack.usePathWalk:: pack.preferBitmapTips:: Specifies a ref hierarchy (e.g., "refs/heads/"); can be - given multiple times to specify more than one hierarchies. + given multiple times to specify more than one hierarchy. When selecting which commits will receive bitmaps, prefer a commit at the tip of a reference that is contained in any of the configured hierarchies. From 60e8015d233a2431e75dcb832dcd5be5368ae452 Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Thu, 16 Apr 2026 23:36:30 +0000 Subject: [PATCH 6/7] doc: fix singular/plural mismatch in git-rerere conflict -> conflicts Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- Documentation/git-rerere.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-rerere.adoc b/Documentation/git-rerere.adoc index 99f967b7a4c0da..4e6ab9a27c9168 100644 --- a/Documentation/git-rerere.adoc +++ b/Documentation/git-rerere.adoc @@ -44,7 +44,7 @@ will automatically invoke this command. 'forget' :: Reset the conflict resolutions which rerere has recorded for the current -conflict in paths that match . +conflicts in paths that match . 'diff':: From e8955061076952cc5eab0300424fc48b601fe12d Mon Sep 17 00:00:00 2001 From: Elijah Newren Date: Thu, 16 Apr 2026 23:36:31 +0000 Subject: [PATCH 7/7] doc: fix grammar errors in submodule description 6cc6d1b4c699 (Documentation: update add --force option + ignore=all config, 2026-02-06) added text describing both the ignore=none and ignore=all behaviors. The former had minor formatting and grammatical errors, while the latter was a bit garbled. I have tried to tweak the wording on the latter to make it read as I think was intended, and fixed the minor grammatical issues with both as well. Signed-off-by: Elijah Newren Signed-off-by: Junio C Hamano --- Documentation/config/submodule.adoc | 2 +- Documentation/gitmodules.adoc | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Documentation/config/submodule.adoc b/Documentation/config/submodule.adoc index 8dacb852c7bf99..4c424017b4821e 100644 --- a/Documentation/config/submodule.adoc +++ b/Documentation/config/submodule.adoc @@ -40,7 +40,7 @@ submodule..ignore:: takes only differences between the HEAD of the submodule and the commit recorded in the superproject into account. "untracked" will additionally let submodules with modified tracked files in their work tree show up. - When set to "none"(default) It also show submodules as changed if they have + When set to "none" (default) it also shows submodules as changed if they have untracked files in their work tree. This setting overrides any setting made in .gitmodules for this submodule, both settings can be overridden on the command line by using the diff --git a/Documentation/gitmodules.adoc b/Documentation/gitmodules.adoc index 3792da96aa2ba7..fd96639806ea3d 100644 --- a/Documentation/gitmodules.adoc +++ b/Documentation/gitmodules.adoc @@ -70,10 +70,10 @@ submodule..ignore:: -- all;; The submodule will never be considered modified (but will nonetheless show up in the output of status and commit when it has - been staged). Add `(new commits)` can be overruled using the - `git add --force `. - The setting affects `status`, `update-index`, `diff` and `log`(due - to underlaying `diff`). + been staged). Adding a submodule with `(new commits)` can be + overridden using `git add --force `. + This setting affects `status`, `update-index`, `diff` and `log` + (due to underlying `diff`). dirty;; All changes to the submodule's work tree will be ignored, only committed differences between the `HEAD` of the submodule and its