Consider the following scenario:
- A Server which holds the full repository
- A Laptop with a small disk, cloned the repository
Now when i am online i'd just like to mount the repository from the server on over to the client, shadowing the local repository. But when offline and the server is not mounted the local repository takes place.
The Question is now what would be a viable concept to get this right. Especially will the assistant become confused when it runs on the server side and locally on the laptop
while the mount is in effect. Would it be sensible not to mount the whole repository tree but only parts like .git/annex
or .git/annex/objects
?
Not tried this yet, but I am wondering whats the most viable approach would be.
From the few details you give, this sounds like a bad idea. git-annex tells different repos apart by using a UUID. You can see this UUID in
.git/config
.But if you are really insistent on doing this, you could always system link the folder to the spot you want it, then write a script that mounts the server in an arbitrary location and redoes the system link. I'd try this on a copy of the data or with some data that doesn't matter before going for it.
I know that this is a bad idea right now when done in a naive approach, I am wondering if git-annex could be made aware of this case and how it could be implemented. A immature idea for example would be only to overmount the .git/annex/objects folder and let the git-annex check if the objects lay on a different device, if so, refuse to do operation on the object store.
I started this thread to figure out if there is some interest in such functionality and if so, polishing it out to see how it could be done.