diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-16 19:01:27 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-16 19:01:27 +0100 |
commit | 98e6edb546116cd98abdc3b37c6744e859bbde5c (patch) | |
tree | fb8bee3bc39eb5de0e7ef3f18b982cb96134595c /lib/git/index/base.py | |
parent | 3d061a1a506b71234f783628ba54a7bdf79bbce9 (diff) | |
download | gitpython-98e6edb546116cd98abdc3b37c6744e859bbde5c.tar.gz |
Initial implementation of submodule.add without any tests. These are to come next
Diffstat (limited to 'lib/git/index/base.py')
-rw-r--r-- | lib/git/index/base.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/git/index/base.py b/lib/git/index/base.py index 05501ba1..a982d5c5 100644 --- a/lib/git/index/base.py +++ b/lib/git/index/base.py @@ -35,7 +35,8 @@ from git.exc import ( ) from git.objects import ( - Blob, + Blob, + Submodule, Tree, Object, Commit, @@ -553,7 +554,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): for item in items: if isinstance(item, basestring): paths.append(self._to_relative_path(item)) - elif isinstance(item, Blob): + elif isinstance(item, (Blob, Submodule)): entries.append(BaseIndexEntry.from_blob(item)) elif isinstance(item, BaseIndexEntry): entries.append(item) @@ -588,7 +589,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): They are added at stage 0 - - Blob object + - Blob or Submodule object Blobs are added as they are assuming a valid mode is set. The file they refer to may or may not exist in the file system, but must be a path relative to our repository. @@ -612,6 +613,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): explicitly set. Please note that Index Entries require binary sha's. :param force: + **CURRENTLY INEFFECTIVE** If True, otherwise ignored or excluded files will be added anyway. As opposed to the git-add command, we enable this flag by default |