Skip to content

Fix empty git bug - #11

Merged
galan merged 3 commits into
galan:masterfrom
flecno:fix-empty-git-bug
Aug 21, 2026
Merged

galan merged 3 commits into
galan:masterfrom
flecno:fix-empty-git-bug

Conversation

@flecno

@flecno flecno commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Git 2.47.0 introduced a new feature which spawns a detached git maintenance run in the background. This can result in
a problem because it creates a maintenance.lock file.
The current IsEmpty implementation then interprets that incorrectly.

One option is to disable this with the config maintenance.auto=false but I think it's more safe to just check if .git exists and contains at least one commit ref.

But we should keep that feature in mind when using concurrency on the same repository!

See also argoproj/argo-cd#25101

flecno added 2 commits August 21, 2026 00:22
Git 2.47.0 introduced a new feature which spawns a detached
`git maintenance run` in the background. This can result in
a problem because it creates a `maintenance.lock` file.
The current IsEmpty implementation then interprets that
incorrectly.

One option is to disable this with the config `maintenance.auto=false`
but I think it's more safe to just check if `.git` exists and contains
at least one commit ref.

But we should keep that feature in mind when using concurrency on the
same repository!

See also argoproj/argo-cd#25101
@flecno
flecno force-pushed the fix-empty-git-bug branch from dd8c458 to ea669be Compare August 20, 2026 22:23
@flecno
flecno force-pushed the fix-empty-git-bug branch from ea669be to 76560c3 Compare August 20, 2026 22:28
@galan
galan merged commit ebf7f54 into galan:master Aug 21, 2026
1 check passed
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.

2 participants