west update fails on submodules with relative paths
See original GitHub issueWhen west initializes project repository it only adds remote with name specified in west.yml
while git assumes that default remote is origin
. Relative submodule paths are resolved to default remote.
Without origin
remote, west update
fails while trying to update repository that contains submodules with relative paths, with following warning
warning: could not look up configuration 'remote.origin.url'. Assuming this repository is its own authoritative upstream.
git logic for resolving relative paths can be found here https://github.com/git/git/blob/v2.20.1/builtin/submodule--helper.c#L135
Manually adding origin
remote solves the issue.
i’d propose west should also add origin
remote to projects by default.
Issue Analytics
- State:
- Created 2 years ago
- Comments:45 (12 by maintainers)
Top Results From Across the Web
Can't add git submodule when specified as a relative path
The submodule helper update_clone called by " git submodule update ", clones submodules if needed. As submodules used to have the URL indicating ......
Read more >[feature] allow west to report if any of the cloned repositories is ...
west status , as a wrapper around git status , reports status relative to HEAD , not manifest-rev . So its output is...
Read more >gitmodules fail when using relative path | Bamboo - Jira
gitmodule descriptor, Bamboo, when Bitbucket server repository is created, generates and configures an SSH key on Bitbucket/repository. The problem can be ...
Read more >West Manifests - Zephyr Project Documentation
Relative path specifying where to clone the repository locally, relative to the top directory in the west workspace.
Read more >West APIs — Zephyr Project Documentation
This page documents the Python APIs provided by west, as well as some ... repo_path : relative filesystem path to the manifest repository ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The problem with #546 is that it breaks a guarantee we have had since the beginning, namely that your working tree’s remotes do not matter to west, and you can change them at will. I tried to explain that in https://github.com/zephyrproject-rtos/west/issues/545#issuecomment-937265242. I should have been clearer; this is a blocker for me.
There are some pathological examples (see https://datatracker.ietf.org/doc/html/rfc3986.html#section-5.4 and https://www.rfc-editor.org/errata/eid4547) where git does different things, but in normal cases this seems to work fine as far as I can tell, and even the RFC editors don’t seem to have a good handle on the edge cases.