Tan*_*lee 4 python git hash md5
如果要执行以下操作:
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()
Run Code Online (Sandbox Code Playgroud)
test.txt
)。test.txt
从远程获取哈希值不同。有谁知道为什么会这样?
如果您在 Windows 上运行,git 的 autocrlf 功能可能是摘要更改的原因:
这将显示当前值:
git config --global core.autocrlf
除“False”之外的任何内容都可能导致您所观察到的行为。
归档时间: |
|
查看次数: |
741 次 |
最近记录: |