-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move sno repository into .git folder (working trees) #147
Comments
Current structure
Proposed
|
So medium-term, we want to be able to support files in repos as well. These could be documentation, map legends, or other supporting information that goes with the datasets. And some folder structure (which we already kinda-have internally). eg:
The concept was that this would be an actual worktree/working-copy and exclude dataset objects from being populated into it via sparse-checkouts, specifically the newer There are some UX issues to work through here with respect to how to effectively stop people from committing GPKG/SHP/CSV/whatever data as "files" instead of getting them imported into actual Sno datasets. → In the meantime, no problem with bare repo + If the working copy doesn't have local files — eg. it's a PostgisDB, then we end up with:
As you identified, since 💡 generate a placeholder file into each folder (maybe with human-readable info on where the working copy/dataset is?) so the folders don't appear empty, then effectively git-ignore it (via |
From a very quick look through the git/libgit2 source, seems like |
Yeah, I missed out a con earlier - a bare repository doesn't let you check in random files by putting them in the working tree, but if we move the git files into .git then you would be able to, if I understand git correctly. I guess this should wait until we get sparse checkouts working. |
So I did some testing of sparse-checkouts, and it's fairly functional and seems to work well. For a new repo:
If cloning... either: $ git clone --sparse ...
$ git sparse-checkout set '/*' '!**/.sno-table/' or: $ git clone --no-checkout ...
$ git sparse-checkout init # sets core.sparseCheckout
$ git sparse-checkout set '/*' '!**/.sno-table/' # updates .git/info/sparse-checkout
$ git checkout HEAD (which do the same thing) |
This is done, in that git internals are now (generally) hidden in a .sno folder. There is a plan to do sparse checkouts of the git objects into a working tree - with ".sno-dataset" trees filtered out since they get put into the DB working copy, but checking out everything else, and allowing any extra user files to be checked into this structure. This has not been started and still needs more design work. It can be tracked separately. |
It seems like the entire sno repository - excepting the working copy - could be moved into a .git folder. Thoughts?
Pros:
Cons:
The text was updated successfully, but these errors were encountered: