When importing using a tag for the upstream point to use, use the given
tag provided instead of running describe against it again as this might
result in the wrong tag being returned.
The documentation for git describe states that when provided a tag,
`git describe <tag>` will simply return the given tag, however
when it is not an annotated tag it is possible for there to be multiple
tags on the same commit and `git describe` may return any of them
instead of the originally given tag. Explicitly add a check to see if
the commit(ish) reference to import from is a tag and skip calling `git
describe` in such a case.
Reviewed: https:/ /review. openstack. org/381930 /git.openstack. org/cgit/ openstack/ git-upstream/ commit/ ?id=f243bd63557 54a0e4c77eb8a6a 4abeb70d1a8b48
Committed: https:/
Submitter: Jenkins
Branch: master
commit f243bd6355754a0 e4c77eb8a6a4abe b70d1a8b48
Author: Darragh Bailey <email address hidden>
Date: Tue Oct 4 14:43:29 2016 +0100
Use tag for import branch naming when given
When importing using a tag for the upstream point to use, use the given
tag provided instead of running describe against it again as this might
result in the wrong tag being returned.
The documentation for git describe states that when provided a tag,
`git describe <tag>` will simply return the given tag, however
when it is not an annotated tag it is possible for there to be multiple
tags on the same commit and `git describe` may return any of them
instead of the originally given tag. Explicitly add a check to see if
the commit(ish) reference to import from is a tag and skip calling `git
describe` in such a case.
Change-Id: I7c6c3c2eb13808 9ccbc13d773da3d 8a4a8efe673
Related-Bug: #1625878