Closed gl-yziquel closed 3 months ago
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.
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.
I really want to keep the current setup.
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:
https://github.com/SWI-Prolog/swipl-devel/issues/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.