Skip to contentSkip to conversation

grokmirror: absolute paths and objstores..

DISCUSSION Eric Wong 1 participant 1 message Oct 11, 2022

lore
Share & tools
lore

Eric Wong

author
#0 lore raw

One thing I noticed with grokmirror is that it uses absolute paths everywhere. That makes it non-trivial to relocate the repos to a different FS location (e.g.: clone on my workstation while on a fast network, copy to USB stick, copy to laptop, and work offline)

I also wonder if using only URLs (and not FS paths) remote.*.url in both objstores and non-objstores would be simpler and more robust. In that case, `git fetch --all' can be called from the objstores to update all remotes.

The non-objstores would only store refs in nearly all cases.

That would completely avoid local FS paths from being in $GIT_DIR/config, only objects/info/alternates

A lazy implementor can just call `git fetch' on the non-objstore and let alternates + repack deal with redundancy in case there's a small window where commits appear after the objstore fetch but before the non-objstore fetch.

An implementor can of course avoid `git fetch' on non-objstores by manually updating refs in the non-objstore, though.