mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Allow shallow cloning
This commit is contained in:
parent
aa4bc9d241
commit
e74253d2de
3 changed files with 90 additions and 15 deletions
|
|
@ -142,3 +142,8 @@ def git_commit(*args, **kwargs):
|
|||
if msg is not None: # allow skipping `-m` with `msg=None`
|
||||
cmd += ('-m', msg)
|
||||
return fn(*cmd, **kwargs)
|
||||
|
||||
|
||||
def git_ref_count(repo):
|
||||
_, out, _ = cmd_output('git', 'rev-list', '--all', '--count', cwd=repo)
|
||||
return int(out.split()[0])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue