Skip to content

Commit 9843772

Browse files
author
Nguyen Huy Hoang
committed
feat: add porcelain-style convenience apis on repo (create_branch and merge)
Signed-off-by: Nguyen Huy Hoang <181364121+huyhoang171106@users.noreply.github.com>
1 parent becccc8 commit 9843772

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

git/repo/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ class Repo:
170170
"""Subclasses may easily bring in their own custom types by placing a constructor or
171171
type here."""
172172

173+
def create_branch(self, *args: Any, **kwargs: Any) -> Head:
174+
return self.create_head(*args, **kwargs)
175+
176+
def merge(self, *args: Any, **kwargs: Any) -> str:
177+
return self.git.merge(*args, **kwargs)
178+
173179
def __init__(
174180
self,
175181
path: Optional[PathLike] = None,

0 commit comments

Comments
 (0)