Fixed bug in getting nearest tag for the commit in changelog mode.
authorEd Bartosh <eduard.bartosh@intel.com>
Mon, 25 Jun 2012 14:46:46 +0000 (17:46 +0300)
committerEd Bartosh <eduard.bartosh@intel.com>
Mon, 25 Jun 2012 14:46:46 +0000 (17:46 +0300)
Previously HEAD is used to find this tag, which is not correct.

Change-Id: Ifc9ad7377be2ec5fdc33253b7977889398f7fa93

gitbuildsys/cmd_changelog.py

index 4e69b97..3d69008 100644 (file)
@@ -60,7 +60,7 @@ def get_version(git_repo, commit):
     """
     version = git_repo.rev_parse(commit, ['--short'])
     try:
-        version = "%s@%s" % (git_repo.find_tag('HEAD'), version)
+        version = "%s@%s" % (git_repo.find_tag(commit), version)
     except GitRepositoryError:
         pass