Skip to content

vfs-2.54.0: backport upstream v2.54.0 regression fixes#932

Merged
dscho merged 7 commits into
vfs-2.54.0from
vfs-2.54.0-backports
Jun 3, 2026
Merged

vfs-2.54.0: backport upstream v2.54.0 regression fixes#932
dscho merged 7 commits into
vfs-2.54.0from
vfs-2.54.0-backports

Conversation

@dscho

@dscho dscho commented Jun 3, 2026

Copy link
Copy Markdown
Member

This PR backports a couple of fixes for regressions that have been identified to be present in Git v2.54.0.

jonatan-holmgren and others added 7 commits April 25, 2026 19:22
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>
@dscho dscho self-assigned this Jun 3, 2026
@dscho dscho marked this pull request as ready for review June 3, 2026 17:10
@dscho dscho requested review from derrickstolee and mjcheetham June 3, 2026 17:10
@dscho dscho merged commit 0df9893 into vfs-2.54.0 Jun 3, 2026
273 of 275 checks passed
@dscho dscho deployed to release June 8, 2026 17:16 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants