vfs-2.54.0: backport upstream v2.54.0 regression fixes#932
Merged
Conversation
Historically, config entries like alias.foo.bar expanded the alias "foo.bar". The subsection-based alias syntax introduced in ac1f12a (alias: support non-alphanumeric names via subsection syntax, 2026-02-18) broke that behavior by treating such entries as if they were subsection syntax. Restore support for the old dotted form by falling back to the full name when the final key is not "command". Add tests covering execution and help output for simple dotted aliases. Reported-by: Michael Grossfeld <michael.grossfeld@amd.com> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Jonatan Holmgren <jonatan@jontes.page> Signed-off-by: Junio C Hamano <gitster@pobox.com>
The commit "3ef68ff40e (shallow: handling fetch relative-deepen, 2026-02-15)" introduced a bug where using --deepen=<n> on a non- shallow repository incorrectly treated the value as an absolute depth, resulting in a shallow fetch and truncated history. This patch prevents any modification when a relative deepen is requested on a non-shallow repository. A test is added to ensure that history is not changed when --deepen is used on a non-shallow repository. Reported-by: Owen Stephens <owen@owenstephens.co.uk> Signed-off-by: Samo Pogačnik <samo_pogacnik@t-2.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
When running git-maintenance(1), we create a lockfile that is supposed to keep other maintenance processes from running at the same time. This lockfile is broken though in case the "--detach" flag is passed: the lockfile is created by the parent process and will be cleaned up either manually or on exit. But when detaching, the parent will exit before all of the background maintenance tasks have been run, and consequently the lock only covers a smaller part of the whole maintenance process. Fix this bug by reassigning all tempfiles from the parent process to the child process when daemonizing so that it becomes the responsibility of the child to clean them up. Note that this is a broader fix, as we now always reassign tempfiles when daemonizing. This is a natural consequence of the semantics of `daemonize()` though, as it essentially promises to continue running the current process in the background. It is thus sensible to have that function perform the whole dance of assigning resources to the child process, including tempfiles. There's only a single other caller in "daemon.c", but that process doesn't create any tempfiles before the call to `daemonize()` and is thus not impacted by this change. Reported-by: Jean-Christophe Manciot <actionmystique@gmail.com> Helped-by: Jeff King <peff@peff.net> Helped-by: Derrick Stolee <stolee@gmail.com> Co-authored-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
The "gc.auto" configuration has traditionally been used to turn off running git-gc(1) as part of our auto-maintenance. We have eventually switched over to git-maintenance(1) in a95ce12 (maintenance: replace run_auto_gc(), 2020-09-17), and with 1942d48 (maintenance: optionally skip --auto process, 2020-08-28) we have introduced "maintenance.auto" to control whether or not to run auto-maintenance. At that point though we still shelled out to git-gc(1) internally. So if "gc.auto=0" was set we would still _execute_ git-maintenance(1), but the command would have exited fast because git-gc(1) itself knew to honor the config key. This has recently changed though, as we have adapted the default maintenance strategy to not use git-gc(1) anymore. The consequence is that "gc.auto=0" doesn't have an effect anymore, which is a somewhat surprising change in behaviour for our users. Adapt `run_auto_maintenance()` so that it knows to also read "gc.auto", similar to how it also reads both "maintenance.autoDetach" and "gc.autoDetach". Reported-by: Jean-Christophe Manciot <actionmystique@gmail.com> Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Backport Samo Pogačnik's fix for a v2.54.0 regression where "git fetch --deepen=<n>" against a full clone truncated the history to <n> commits deep instead of being a no-op. The fix landed on upstream master via 186602e ("Merge branch 'sp/shallow-deepen-on-non-shallow-repo-fix'", 2026-06-02); microsoft/git picks it up directly here rather than waiting for it to graduate to upstream/maint and from there into a v2.54.1 maintenance release. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Backport Patrick Steinhardt's fixes for two v2.54.0 regressions in the maintenance machinery. "git maintenance" running with --detach no longer used the lockfile to prevent multiple maintenance processes from running concurrently, and the auto-maintenance dispatch in run-command stopped honoring the gc.auto configuration. The topic landed on upstream master via 6358af7 ("Merge branch 'ps/maintenance-daemonize-lockfix'", 2026-05-22); microsoft/git picks it up directly rather than waiting for it to graduate to upstream/maint and from there into a v2.54.1 maintenance release. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Backport Jonatan Holmgren's fix for a v2.54.0 regression in which ac1f12a ("alias: support non-alphanumeric names via subsection syntax") silently broke the longstanding dotted alias form, e.g. [alias] pull.sub = "!cmd", so that "git pull.sub" failed with "git: 'pull.sub' is not a git command". The bug was reported on-list by Michael Grossfeld on 2026-04-23 (Message-ID PH7PR12MB73313034573C59C73F821BBFE52A2@PH7PR12MB7331.namprd12.prod.outlook.com). The fix landed on upstream master via the topic merge and was queued on upstream/maint as 65ab028 ("Merge branch 'jh/alias-i18n-fixes' into maint-2.54", 2026-05-21); microsoft/git picks it up directly rather than waiting for a v2.54.1 maintenance release. Assisted-by: Opus 4.7 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
derrickstolee
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR backports a couple of fixes for regressions that have been identified to be present in Git v2.54.0.