mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-08 20:44:18 +00:00
more fixes for syntax checking
This commit is contained in:
parent
97448dfed7
commit
44c6676070
1 changed files with 2 additions and 2 deletions
|
|
@ -3,12 +3,12 @@ from __future__ import print_function
|
||||||
import argparse
|
import argparse
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import util
|
from pre_commit_hooks.util import cmd_output
|
||||||
|
|
||||||
|
|
||||||
def is_on_branch(protected):
|
def is_on_branch(protected):
|
||||||
retval = False
|
retval = False
|
||||||
branch = util.cmd_output('git', 'symbolic-ref', 'HEAD')
|
branch = cmd_output('git', 'symbolic-ref', 'HEAD')
|
||||||
chunks = branch.strip().split('/')
|
chunks = branch.strip().split('/')
|
||||||
if chunks[2] == protected:
|
if chunks[2] == protected:
|
||||||
retval = True
|
retval = True
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue