-
Notifications
You must be signed in to change notification settings - Fork 175
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
Root .gitmodules shared between multiple yadm configurations #149
Comments
Perhaps yadm-bin update-index --no-assume-unchanged
yadm-bin stash push -m 'yadm submodule' .gitmodules # reference git home dir
yadm-bin submodule add <blah>
yadm-bin add .gitmodules # I think this is done automatically
yadm-bin stash pop # maybe we can track the index from above? does it matter?
yadm-bin update-index --assume-unchanged .gitmodules |
This is sort-of a fundamental part of how submodules are implemented in Git. Git wants to get that information from the The crux of the issue is that you have multiple repos sharing the same work tree. Tracking data with multiple repos contradicts one of yadm's core design principles (using a single repo). If you really want to track the data in multiple repos, you might want to try out vcsh. Although, if I remember correctly, vcsh actually has problems with submodules for the same reason. I would be very hesitant to introduce any special handling of the submodule operation, as an effort to support multiple repositories. However, hooks could be a great way to implement your idea in a shareable way. This is exactly the kind of niche use case that hooks were implemented for. |
Thanks for the information! I'm using This behavior makes sense. It has not been a problem for me (yet) since I don't actually use git submodule (I either use plugin managers, or something like vcs-tool). Closing this for now, as this isn't really an issue but should be known for future adventurers. |
Can yadm treat a folder such as $XDG_CONFIG_HOME/private as separate worktree? |
When using multiple YADM configs (
alias yadm-bin='yadm --yadm-repo ~/bin
, etc), and when adding submodules, YADM writes to the same~/.gitmodules
file.This has not been an issue for me, and I don't think this actually entails an issue in yadm, but I felt it should be brought up for future consideration and testing.
Edit:
This is actually an issue, where the same
.gitmodules
file will be added to each yadm configuration using submodules.The text was updated successfully, but these errors were encountered: