When use 'git rev-parse' to parse the commit a tag point to, it should add
^{commit} after tag name, otherwise git will return the tag SHA1.
Change-Id: I0791f96350b01b458417fcbc27f14b58b79c5742
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
# is needed; and the key point is parse_submit_tag can not ensure the
# tag exsisting too.
try:
- event['patchset_revision'] = mygit.rev_parse(tag)
+ event['patchset_revision'] = mygit.rev_parse('%s^{commit}' % tag)
except GitRepositoryError:
tag = None
elif event['event_type'] == 'change-merged':