From 739fa140235cc9d65c632eaf1f5cacc944d87cfb Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Tue, 23 Nov 2010 09:34:44 +0100 Subject: Fixed remaining tests - lets hope that everything is indeed working correctly - as imports changed, every line of code needs to be run to assure all names can be resolved --- objects/submodule/root.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'objects/submodule') diff --git a/objects/submodule/root.py b/objects/submodule/root.py index 2e3cc775..d194cd5b 100644 --- a/objects/submodule/root.py +++ b/objects/submodule/root.py @@ -48,8 +48,7 @@ class RootModule(Submodule): :param previous_commit: If set to a commit'ish, the commit we should use as the previous commit the HEAD pointed to before it was set to the commit it points to now. - If None, it defaults to ORIG_HEAD otherwise, or the parent of the current - commit if it is not given + If None, it defaults to HEAD@{1} otherwise :param recursive: if True, the children of submodules will be updated as well using the same technique :param force_remove: If submodules have been deleted, they will be forcibly removed. -- cgit v1.2.3 From 264ba6f54f928da31a037966198a0849325b3732 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 24 Nov 2010 17:12:36 +0100 Subject: Fixed remaining issues, all tests work as expected --- objects/submodule/base.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'objects/submodule') diff --git a/objects/submodule/base.py b/objects/submodule/base.py index 4f4223b6..5d32d600 100644 --- a/objects/submodule/base.py +++ b/objects/submodule/base.py @@ -14,6 +14,7 @@ from git.util import ( join_path_native, to_native_path_linux ) + from git.config import SectionConstraint from git.exc import ( InvalidGitRepositoryError, @@ -339,14 +340,7 @@ class Submodule(util.IndexObject, Iterable, Traversable): # have a valid branch, but no checkout - make sure we can figure # that out by marking the commit with a null_sha - # have to write it directly as .commit = NULLSHA tries to resolve the sha - # This will bring the branch into existance - refpath = join_path_native(mrepo.git_dir, local_branch.path) - refdir = os.path.dirname(refpath) - if not os.path.isdir(refdir): - os.makedirs(refdir) - #END handle directory - open(refpath, 'w').write(self.NULL_HEX_SHA) + local_branch.set_object(util.Object(mrepo, self.NULL_BIN_SHA)) # END initial checkout + branch creation # make sure HEAD is not detached -- cgit v1.2.3