mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-15 21:40:19 -06:00
Use hash of repository name to allow tags.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user