Skip to content

Commit

Permalink
Reword partial_to_complete_sha_hex note
Browse files Browse the repository at this point in the history
The git.db.partial_to_complete_sha_hex docstring refers to
"AmbiguousObjects", suggesting the existence of an AmbiguousObject
type (or an AmbiguousObjects type).

Since there appears to be no such type in GitPython (or in gitdb),
this seems to have been written in reference to the condition
expressed by the AmbiguousObjectName exception, which the note
says is not currently able to be raised (such that BadObject is
raised instead) in situations where it would apply.

Since the connection to that exeception is already clear from
context, this commit changes the wording to "ambiguous objects" to
avoid being misread as a reference to a Python class of ambiguous
objects.
  • Loading branch information
EliahKagan committed Feb 26, 2024
1 parent 8bb882e commit ba878ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def partial_to_complete_sha_hex(self, partial_hexsha: str) -> bytes:
:raise BadObject:
:note: Currently we only raise :class:`BadObject` as git does not communicate
AmbiguousObjects separately.
ambiguous objects separately.
"""
try:
hexsha, _typename, _size = self._git.get_object_header(partial_hexsha)
Expand Down

0 comments on commit ba878ef

Please sign in to comment.