We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89249ec commit 88ba1e4Copy full SHA for 88ba1e4
commit_check/util.py
@@ -24,7 +24,7 @@ def get_branch_name() -> str:
24
try:
25
# Git 2.22 and above supports `git branch --show-current`
26
commands = ['git', 'branch', '--show-current']
27
- branch_name = cmd_output(commands)
+ branch_name = cmd_output(commands) or "HEAD"
28
except CalledProcessError:
29
branch_name = ''
30
return branch_name.strip()
0 commit comments