-
Notifications
You must be signed in to change notification settings - Fork 36
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
Can we have several idbs in one git repo? #44
Comments
No, only one idb per repository is currently supported. |
OK thanks for confirming. Ya the subfolder thing was a test I tried but it may not be the most urgent. It would allow YaCo to work on a git repo used for other stuff too but right now we could just have the main git repo and a git submodule for IDBs with all of them in that git submodule. It would still be better than having one git repo per IDB and it would also allow not having the YaCo commits in mixed with the ones of the main repo. I agree with the backwards compatibility problem but I feel it would really be a useful feature. I am not sure if that would work or how it is handled atm but let's say for now the path of the IDB is not stored because there is no need to (since there is only one and the idb name is the same as the original with "_local" appended ), we could have a special case in the YaCo plugin code where: if the IDB path is not stored, then we know it is the old format, otherwise it is the new format). The new format could be a hierarchy of files like:
where the instead of
|
I believe there is a simpler way
Backwards compatibility should be preserved |
Actually, sad news, using multiple idbs in one directory is very complex, because you would not be able to do the whole commit/fetch/rebase/push independently per base. |
Oh right good point. Afaict branches would be more appropriate than tags. See explanation here. We would need to create a branch (e.g using the same name as the idb name) for each idb.
One problem I can think of already is since each idb would only exist in one branch, it means we would not be able to analyze two idbs at the same time (as other idbs files from the one we want to analyze/open will "disappear" each time we switch branches). If that is not a constraint, then it would be quite simple as we would just need to switch to the branch before the commit
and then afaict we can commit, fetch, rebase and push and it will be done for this specific branch only. But ya since files "disappear", it means we would still need to commit at least all idb once in the master branch so new users can see them by default, open them so they create their own copy of the _local.idb file. Then they don't need to checkout master anymore but they would need to checkout master for every new idb created that they haven't created a _local.idb yet. Annoying :( |
You cannot have multiple branches at the same time, but you can have multiple tags tracking the latest known state of each IDB cache. Instead of reading files directly, maybe something could be done by asking the diff between the tag and the HEAD instead. |
Hi,
Sorry for the dumb question. From my testing, the answer is no and afaict we have to create one git repo per idb? Is that correct?
I tried to add a 2nd idb in the same folder and it looks like it imported the comments from the first idb.
I also tried to create a subfolder in the original git repo and to use an "empty" path when it asks for the git repo and it looks like it created another
.git
folder in the subfolder as if it wasn't already in a git repo already.Thanks,
The text was updated successfully, but these errors were encountered: