Skip to content

Commit

Permalink
Better document overrides in GitCmdObjectDB
Browse files Browse the repository at this point in the history
  • Loading branch information
EliahKagan committed Mar 1, 2024
1 parent 6565742 commit c0a27c0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion git/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ def __init__(self, root_path: PathLike, git: "Git") -> None:
self._git = git

def info(self, binsha: bytes) -> OInfo:
"""Get a git object header (using git itself)."""
hexsha, typename, size = self._git.get_object_header(bin_to_hex(binsha))
return OInfo(hex_to_bin(hexsha), typename, size)

def stream(self, binsha: bytes) -> OStream:
"""For now, all lookup is done by git itself"""
"""Get git object data as a stream supporting ``read()`` (using git itself)."""
hexsha, typename, size, stream = self._git.stream_object_data(bin_to_hex(binsha))
return OStream(hex_to_bin(hexsha), typename, size, stream)

Expand Down

0 comments on commit c0a27c0

Please sign in to comment.