mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Move get_head_sha into testing since it is only used by tests.
This commit is contained in:
parent
db6e1afc75
commit
94d626691f
5 changed files with 15 additions and 15 deletions
|
|
@ -22,11 +22,6 @@ def get_root():
|
|||
return _get_root_new()
|
||||
|
||||
|
||||
def get_head_sha(git_repo_path):
|
||||
with local.cwd(git_repo_path):
|
||||
return local['git']['rev-parse', 'HEAD']().strip()
|
||||
|
||||
|
||||
@memoize_by_cwd
|
||||
def get_staged_files():
|
||||
return local['git']['diff', '--staged', '--name-only']().splitlines()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue