Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Chaumond <julien@huggingface.co>
  • Loading branch information
Wauplin and julien-c authored Jul 12, 2024
1 parent d17dc63 commit db05a98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/huggingface_hub/_commit_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def _local_oid(self) -> Optional[str]:
For LFS files, the OID corresponds to the SHA256 of the file content (used a LFS ref).
For regular files, the OID corresponds to the SHA1 of the file content.
Note: this is slightly different to git OID computation since the oid of an LFS file is usually the SHA1 of the
Note: this is slightly different to git OID computation since the oid of an LFS file is usually the git-SHA1 of the
pointer file content (not the actual file content). However, using the SHA256 is enough to detect changes
and more convenient client-side.
"""
Expand Down
2 changes: 1 addition & 1 deletion src/huggingface_hub/utils/sha.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def sha_fileobj(fileobj: BinaryIO, chunk_size: Optional[int] = None) -> bytes:

def git_hash(data: bytes) -> str:
"""
Computes the sha1 hash of the given bytes, using the same algorithm as git.
Computes the git-sha1 hash of the given bytes, using the same algorithm as git.
This is equivalent to running `git hash-object`. See https://git-scm.com/docs/git-hash-object
for more details.
Expand Down

0 comments on commit db05a98

Please sign in to comment.