Disable git gc/maintenance on repositories opam maintains - #7073
Merged
Conversation
kit-ty-kate
force-pushed
the
no-git-maintenance
branch
2 times, most recently
from
August 13, 2026 19:11
e8a5b14 to
a72c2f1
Compare
rjbou
reviewed
Aug 19, 2026
rjbou
left a comment
Collaborator
There was a problem hiding this comment.
On the idea, lgtm! Somme comments to address and good to go
kit-ty-kate
force-pushed
the
no-git-maintenance
branch
from
August 19, 2026 23:28
a72c2f1 to
9d6c76d
Compare
kit-ty-kate
marked this pull request as ready for review
August 19, 2026 23:30
kit-ty-kate
force-pushed
the
no-git-maintenance
branch
from
August 20, 2026 00:05
9d6c76d to
075e805
Compare
rjbou
approved these changes
Aug 20, 2026
rjbou
left a comment
Collaborator
There was a problem hiding this comment.
lgtm! some tiny comments remaining, but the PR is good to merge
| Note however that it cannot be used if you need values from the global git | ||
| configs (e.g. /etc/gitconfig or ~/.gitconfig) *) | ||
| val env : unit -> string array | ||
| val env : string array Lazy.t |
Collaborator
There was a problem hiding this comment.
Suggested change
| val env : string array Lazy.t | |
| val env : unit -> string array |
Member
Author
There was a problem hiding this comment.
If you want but i'd argue that it is dangerous to not make it explicit that the return value is memoised when returning a mutable value. Although this is a different issue and should be applied to OpamProcess.default_env too in a separate PR later. I've opened #7088 for that.
kit-ty-kate
force-pushed
the
no-git-maintenance
branch
from
August 20, 2026 12:20
075e805 to
a66b58c
Compare
This was referenced Aug 20, 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.
Partially f.i.x.e.s #7031
This should fix most sources of errors when using recent git versions, however this won't help users avoid this type of error during things like
opam pin add -k path .of a git repository (maybe--workingdiralthough this one i'm not sure) or any copy or directory non-git aware scans of things that contain git repositories.This will also not fix already created repositories. However an alternative could be to use
GIT_CONFIG_KEY_*andGIT_CONFIG_VALUE_*environment variable instead. Doing it this way would fix it retroactively as well. It might also help for things like #6955 if we generalise the use of these variables.EDIT: see fixup commit
A downside of disabling these detachable jobs in theory is that we could loose efficiency by not repacking once in a while but i think this should be fine.