mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Use hash of repository name to allow tags.
This commit is contained in:
parent
d2a349a0d8
commit
4ec877628d
3 changed files with 14 additions and 13 deletions
|
|
@ -1,5 +1,6 @@
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import hashlib
|
||||
import io
|
||||
import logging
|
||||
import os
|
||||
|
|
@ -74,7 +75,9 @@ class Store(object):
|
|||
self.require_created()
|
||||
|
||||
# Check if we already exist
|
||||
sha_path = os.path.join(self.directory, sha)
|
||||
sha_path = os.path.join(
|
||||
self.directory, sha + '_' + hashlib.md5(url).hexdigest()
|
||||
)
|
||||
if os.path.exists(sha_path):
|
||||
return os.readlink(sha_path)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue