Description
When using a Scalar clone with the GVFS protocol, the objects from the server are populated in the Scalar cache directory. This is listed as an alternate for the local git enlistment to read from.
In order to keep the alternate maintained, the background maintenance does some changes to point the object directory at the shared object cache (the alternate) so it can mutate those files. This has some side effects:
- The local
.git/objects
directory is never maintained. This continues to grow and remain unpacked for the lifetime of the enlistment. This should only contain the objects created by the user, but that can grow over time. - The
git pack-refs
process run by weekly maintenance can fail when it cannot see the local objects. This process is run withGIT_OBJECT_DIRECTORY
equal to the shared object cache, so doesn't see the objects created by the user unless they have pushed them and then fetched them into the shared object cache.
One way to fix both of these problems could be to copy the objects from .git/objects
into the shared object cache. This could be a new maintenance task, likely good to do within the daily
schedule. It could also be something to do before the loose-objects
step, since we don't expect any packfiles here.
Note: there was a bug that led to users downloading server data into their
.git/objects
directory instead of to the shared object cache. Having something copy loose objects and packs from their.git/objects
directory could help get those enlistments under control.