File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2045,7 +2045,7 @@ def git_get(
20452045 tag == next (args )
20462046 branch = None
20472047 else :
2048- remote = next ( args )
2048+ remote = arg
20492049 assert remote , f'{ default_remote = } and no remote specified in remote={ remote0 !r} .'
20502050 assert branch or tag , f'{ branch = } { tag = } and no branch/tag specified in remote={ remote0 !r} .'
20512051
@@ -2940,7 +2940,10 @@ def get_one(self):
29402940 def _file_id (self , path ):
29412941 mtime = os .stat (path ).st_mtime
29422942 with open (path , 'rb' ) as f :
2943- hash_ = hashlib .file_digest (f , hashlib .md5 ).digest ()
2943+ content = f .read ()
2944+ hash_ = hashlib .md5 (content ).digest ()
2945+ # With python >= 3.11 we can do:
2946+ #hash_ = hashlib.file_digest(f, hashlib.md5).digest()
29442947 return mtime , hash_
29452948 def _items (self ):
29462949 ret = dict ()
You can’t perform that action at this time.
0 commit comments