Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions pipcl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,7 @@ def git_get(
tag == next(args)
branch = None
else:
remote = next(args)
remote = arg
assert remote, f'{default_remote=} and no remote specified in remote={remote0!r}.'
assert branch or tag, f'{branch=} {tag=} and no branch/tag specified in remote={remote0!r}.'

Expand Down Expand Up @@ -2940,7 +2940,10 @@ def get_one(self):
def _file_id(self, path):
mtime = os.stat(path).st_mtime
with open(path, 'rb') as f:
hash_ = hashlib.file_digest(f, hashlib.md5).digest()
content = f.read()
hash_ = hashlib.md5(content).digest()
# With python >= 3.11 we can do:
#hash_ = hashlib.file_digest(f, hashlib.md5).digest()
return mtime, hash_
def _items(self):
ret = dict()
Expand Down