aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'MgaRepo/git.py')
-rw-r--r--MgaRepo/git.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/MgaRepo/git.py b/MgaRepo/git.py
index ab89b25..4e763f8 100644
--- a/MgaRepo/git.py
+++ b/MgaRepo/git.py
@@ -52,7 +52,7 @@ class GIT(VCS):
else:
return self.update(targetpath, clone=True, **kwargs)
- def init(self, url, targetpath, fullnames=True, **kwargs):
+ def init(self, url, targetpath, fullnames=True, branch=None, **kwargs):
# verify repo url
execcmd("svn", "info", url)
@@ -73,6 +73,12 @@ class GIT(VCS):
"svn-remote.authorlog.defaultmail": usermap.defaultmail}
self.configset(gitconfig)
+ if branch:
+ execcmd(("git", "init", "-q", self.path), **kwargs)
+ execcmd(("git", "checkout", "-q", branch), **kwargs)
+ cmd = ["svn", "rebase", "--local"]
+ status, output = self._execVcs(*cmd, **kwargs)
+
return True
def info(self, path, **kwargs):