Skip to content

Commit 0b33576

Browse files
David RobertsonByron
David Robertson
authored andcommitted
Allow repo.create_head's commit arg to be a SymbolicReference
This matches the signature from `Head.create`.
1 parent b85c259 commit 0b33576

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git/repo/base.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,8 @@ def _to_full_tag_path(path: PathLike) -> str:
420420
else:
421421
return TagReference._common_path_default + '/' + path_str
422422

423-
def create_head(self, path: PathLike, commit: str = 'HEAD',
423+
def create_head(self, path: PathLike,
424+
commit: Union['SymbolicReference', 'str'] = 'HEAD',
424425
force: bool = False, logmsg: Optional[str] = None
425426
) -> 'Head':
426427
"""Create a new head within the repository.

0 commit comments

Comments
 (0)