EVerest / everest-dev-environment

Useful tools for developing EVerest
Apache License 2.0
12 stars 15 forks source link

git error messages when using a ref instead of a branch #34

Open DerMolly opened 12 months ago

DerMolly commented 12 months ago

Currently we get an error messages when running edm init if one of the repos is pinned to ref instead of a branch or tag.

[edm]: Setting up dependency "libslac" in workspace
[edm]:    Error while cloning git repository during local dependency checkout:
[edm]:       Cloning into '/Users/molly/Developer/pionix/everest/libslac'...
[edm]:       fatal: Remote branch 486cd8b not found in upstream origin
[edm]:     No git_rev given, but git_tag "486cd8b" might be a git_rev, trying to checkout this rev.
[edm]:     Successfully checked out git_rev "486cd8b" of dependency "libslac"

This behaviour is confusing because, there is no actual error, but edm reports it as such. (Well git does, but we take this as your own message here)

In the future there should be not error when this happens. It could be benefical to warn the user that this was happened, as we should try to keep branch and tags and not git refs pinned, but this is not strictly necessary imho.