If one were to do the following:
def hashmdfive(filename):
"""Generate the md5 checksum."""
hasher = hashlib.md5()
with open(filename, "rb") as afile:
buf = afile.read()
hasher.update(buf)
return hasher.hexdigest()
- make a file (e.g.
test.txt) with some content. - create hash of file by running hashmdfive above.
- committing and pushing to a remote git repo
- delete local file.
- fetching
test.txtfrom remote - create new hash of file by running hashmdfive above.
THE HASHES ARE DIFFERENT. Does anyone know why that is the case?
from MD5 hash of file changes after comitting, deleting and fetching from git
No comments:
Post a Comment