Skip to content

Commit 086e832

Browse files
committed
Fix union type conversion to path
1 parent 3801505 commit 086e832

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git/refs/log.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def __init__(self, filepath: Union[PathLike, None] = None) -> None:
168168
"""Initialize this instance with an optional filepath, from which we will
169169
initialize our data. The path is also used to write changes back using the
170170
:meth:`write` method."""
171-
self._path = os.fspath(filepath)
171+
self._path = None if filepath is None else os.fspath(filepath)
172172
if filepath is not None:
173173
self._read_from_file()
174174
# END handle filepath

0 commit comments

Comments
 (0)