mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-10 21:34:18 +00:00
fix command
This commit is contained in:
parent
c96572c378
commit
a4b796385c
1 changed files with 2 additions and 2 deletions
|
|
@ -17,5 +17,5 @@ def git_commit(*args, **kwargs):
|
||||||
|
|
||||||
|
|
||||||
def get_default_branch():
|
def get_default_branch():
|
||||||
cmd = ('git', 'config', '--get', 'init.defaultBranch')
|
ret = subprocess.getoutput('git config init.defaultBranch').strip()
|
||||||
return subprocess.getoutput(cmd).strip() or 'master'
|
return ret or 'master'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue