Browse Source

git-url: use git branch --show-current

raylu 2 năm trước cách đây
mục cha
commit
de6e6ba941
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      git-url

+ 1 - 1
git-url

@@ -9,7 +9,7 @@ def oneliner(*args):
 	return subprocess.check_output(args, universal_newlines=True).strip()
 
 commit = oneliner('git', 'rev-parse', 'HEAD')
-local_branch = oneliner('git', 'name-rev', '--name-only', 'HEAD')
+local_branch = oneliner('git', 'branch', '--show-current')
 
 tag = None
 if local_branch.startswith('tags/'):