Fix getting branch name not working if HEAD is also a tag

This commit is contained in:
Kovid Goyal 2021-12-03 10:59:05 +05:30
parent 44c460627b
commit 4df7935799
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -10,7 +10,7 @@ prev_rev, current_rev, flags = sys.argv[1:]
def get_branch_name(rev):
return subprocess.check_output(['git', 'name-rev', '--name-only', rev]).decode('utf-8').strip()
return subprocess.check_output(['git', 'name-rev', '--name-only', '--refs=refs/heads/*', rev]).decode('utf-8').strip()
base = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))