config: Fix passing a git hash as revision
See discussion at !76 (closed)
When passing a hash as the repo revision, we currently attempt to do a
git reset origin/<hash>
which fails. The git reset
is only meant to
sync local branches with the remote, when the repo revision is a branch.
Use git show-ref
to test if the revision is a branch, and only perform
the git reset
in this case.
Reported-by: Sudeep Holla sudeep.holla@arm.com Signed-off-by: Jean-Philippe Brucker jean-philippe@linaro.org