Remove clone depth check

This commit is contained in:
DanielChabrowski 2019-03-15 23:25:04 +01:00
parent ec2e15f086
commit e748da2abe
2 changed files with 0 additions and 7 deletions

View file

@ -142,8 +142,3 @@ def git_commit(*args, **kwargs):
if msg is not None: # allow skipping `-m` with `msg=None` if msg is not None: # allow skipping `-m` with `msg=None`
cmd += ('-m', msg) cmd += ('-m', msg)
return fn(*cmd, **kwargs) return fn(*cmd, **kwargs)
def git_ref_count(repo):
_, out, _ = cmd_output('git', 'rev-list', '--all', '--count', cwd=repo)
return int(out.split()[0])

View file

@ -16,7 +16,6 @@ from pre_commit.util import CalledProcessError
from testing.fixtures import git_dir from testing.fixtures import git_dir
from testing.util import cwd from testing.util import cwd
from testing.util import git_commit from testing.util import git_commit
from testing.util import git_ref_count
def test_our_session_fixture_works(): def test_our_session_fixture_works():
@ -83,7 +82,6 @@ def test_clone(store, tempdir_factory, log_info_mock):
assert dirname.startswith('repo') assert dirname.startswith('repo')
# Should be checked out to the rev we specified # Should be checked out to the rev we specified
assert git.head_rev(ret) == rev assert git.head_rev(ret) == rev
assert git_ref_count(ret) == 1
# Assert there's an entry in the sqlite db for this # Assert there's an entry in the sqlite db for this
assert store.select_all_repos() == [(path, rev, ret)] assert store.select_all_repos() == [(path, rev, ret)]