Skip to content

Commit

Permalink
Merge pull request #41 from ivellioscolin/mirror_etag_fix
Browse files Browse the repository at this point in the history
Fix incorrect ETag for non git-lfs in mirrors-path.
  • Loading branch information
jstzwj authored Jan 16, 2025
2 parents 17124d9 + 7cd4ec6 commit 58b5110
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion olah/mirror/repos.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def get_file_head(self, commit_hash: str, path: str) -> Optional[Dict[str, Any]]
header = {}
header["content-length"] = str(commit.tree[path].data_stream.size)
header["x-repo-commit"] = commit.hexsha
header["etag"] = self._sha256(commit.tree[path].data_stream.read())
header["etag"] = commit.tree[path].binsha.hex()
return header

def get_file(self, commit_hash: str, path: str) -> Optional[OStream]:
Expand Down

0 comments on commit 58b5110

Please sign in to comment.