4 ms·
Whoa, `git maintenance` looks amazing. It's a background server that you launch with `git maintenance start`. > This cross-platform feature allows Git to keep
by dfabulich 6y ago
Whoa, `git maintenance` looks amazing.
It's a background server that you launch with `git maintenance start`.
> This cross-platform feature allows Git to keep your repository healthy while not blocking any of your interactions. In particular, this will improve your git fetch times by pre-fetching the latest objects from your remotes once an hour.
- linux2647 6y agoHow large does a repository need to get to run into this issue?
- vlovich123 6y agoFor anyone who was worried like me that this would screw up your refs: Instead, the remote refs are stored in refs/prefetch/<remote>/. Also, tags are not updated. This is done to avoid disrupting the remote-tracking branches. The end users expect these refs to stay unmoved unless they initiate a fetch. With prefetch task, however, the objects necessary to complete a later real fetch would already be obtained, so the real fetch would go faster. In the ideal case, it will just become an update to a bunch of remote-tracking branches without any object transfer. So looks like they though of it & looks like there's no reason not to do this?
- phillco 6y agoSounds a lot like Microsoft's Scalar. [1] The commits referenced in the blog post look to be from the Scalar team lead as well. Looks like some of their work is getting upstreamed which is exciting. [2] Although, I wonder what this means for the Scalar project itself. [1] https://devblogs.microsoft.com/devops/introducing-scalar/ https://devblogs.microsoft.com/devops/introducing-scalar/ [2] e.g., https://github.com/git/git/compare/26bb5437f6defed72996b6a2bb1ff9121ec297ff...e841a79a131d8ce491cf04d0ca3e24f139a10b82 https://github.com/git/git/compare/26bb5437f6defed72996b6a2b...
- stolee 6y agoYou're right that we used what we learned from Scalar's background maintenance an applied that to Git itself. Putting background maintenance into Git was actually part of our effort to get Scalar on Linux. You might be interested in our "Philosophy of Scalar" [1] document, which includes this paragraph: > Scalar intends to do very little more than the standard Git client. We actively implement new features into Git instead of Scalar, then update Scalar only to configure those new settings. In particular, we are porting features like background maintenance to Git to make Scalar simpler and make Git more powerful. [1] https://github.com/microsoft/scalar/blob/main/docs/philosophy.md https://github.com/microsoft/scalar/blob/main/docs/philosoph...
- captn3m0 6y ago> cross-platform Implemented via crontab on linux, launchctl on MacOS, and schtasks on Windows. https://git-scm.com/docs/git-maintenance#_background_maintenance_on_posix_systems https://git-scm.com/docs/git-maintenance#_background_mainten...