diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-24 17:12:36 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-24 17:12:36 +0100 |
commit | 264ba6f54f928da31a037966198a0849325b3732 (patch) | |
tree | 3cc84ae352307fd5fded67f6a0c1e4fd376ed843 /objects/submodule | |
parent | ec0657cf5de9aeb5629cc4f4f38b36f48490493e (diff) | |
download | gitpython-264ba6f54f928da31a037966198a0849325b3732.tar.gz |
Fixed remaining issues, all tests work as expected
Diffstat (limited to 'objects/submodule')
-rw-r--r-- | objects/submodule/base.py | 10 |
1 files changed, 2 insertions, 8 deletions
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 |