diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-24 19:48:59 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-24 19:48:59 +0100 |
commit | 3175b5b21194bcc8f4448abe0a03a98d3a4a1360 (patch) | |
tree | f1a098c4b38ae3b7cf52600e9fc9c357cdd7c353 /objects/submodule/base.py | |
parent | fca367548e365f93c58c47dea45507025269f59a (diff) | |
parent | 3203cd7629345d32806f470a308975076b2b4686 (diff) | |
download | gitpython-3175b5b21194bcc8f4448abe0a03a98d3a4a1360.tar.gz |
Merge branch 'reflog'
Diffstat (limited to 'objects/submodule/base.py')
-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 |