-
Notifications
You must be signed in to change notification settings - Fork 82
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
Absolute submodule paths would be welcome. #505
Comments
We use relative paths to consistently checkout via ssh/https. Afaik this is not possible with absolute paths. I don't want to change this setup. |
Sure. I just wanted to make aware of what it implies on the other side. It makes cloning a clone really problematic. |
There should however be very few users with this use case. I trust this can be resolved with a little bit of scripting. |
That kind of scripting ? Yes... for submodule in $(grep -E "^\[submodule" .gitmodules | sed 's/^\[submodule "//;s/"\]//'); do git config submodule.$submodule.url "$(git config --file /path/to/my/local/git/clone/of/swipl-devel/.git/config --get submodule.$submodule.url)"; done That use case arises pretty naturally, though: 1. you want to archive the repositories (which is pretty natural) and 2. you want to build from the archived repositories out of source tree (pretty natural too).
I've just bumped into that same problem with the potassco-asp-course/course repo too. Granted: many people do not archive code they download, and they do not build it, in this era of docker containers. They should, however. |
I really want to keep the current setup. Note however that the releases do not contain submodules. There is one final commit that bundles the contents of the submodules. As long as you do not want to provide development snapshots, there should be no trouble. |
Your call. Just making you aware of the issue. |
Paths of submodules are relative in this repository.
My internal build system, in which I wish to integrate clingo, fares better when submodule paths are relative.
I raised a similar issue on swi-prolog:
SWI-Prolog/swipl-devel#1283
I know this may be a contentious issue. But I'd really suggest making the paths of submodules absolute instead of relative: relative paths behave incorrectly when double cloning git repositories.
The text was updated successfully, but these errors were encountered: