From e00bf792077d59b3344f0d14f3192806c42d54bd Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Mon, 13 Jun 2011 17:03:47 +0200 Subject: root submodule: Added parent_commit parameter for convenience. Fixed submodule tests to run --- git/objects/submodule/root.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'git/objects/submodule/root.py') diff --git a/git/objects/submodule/root.py b/git/objects/submodule/root.py index 5e4cad2d..6917045a 100644 --- a/git/objects/submodule/root.py +++ b/git/objects/submodule/root.py @@ -37,15 +37,14 @@ class RootModule(Submodule): k_root_name = '__ROOT__' - def __init__(self, repo): - # repo, binsha, mode=None, path=None, name = None, parent_commit=None, url=None, ref=None) + def __init__(self, repo, parent_commit = None): super(RootModule, self).__init__( repo, binsha = self.NULL_BIN_SHA, mode = self.k_default_mode, path = '', name = self.k_root_name, - parent_commit = repo.head.commit, + parent_commit = parent_commit or repo.head.commit, url = '', branch_path = git.Head.to_full_path(self.k_head_default) ) -- cgit v1.2.3