diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2017-10-02 12:05:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-02 12:05:08 +0200 |
commit | 95ff8274a0a0a723349416c60e593b79d16227dc (patch) | |
tree | 0791bc13ac54f8ec23a808ae3adaeb57a2dbcd34 /git | |
parent | d2ce49598a25b48ad0ab38cc1101c5e2a42a918e (diff) | |
parent | f2b820f936132d460078b47e8de72031661f848c (diff) | |
download | gitpython-95ff8274a0a0a723349416c60e593b79d16227dc.tar.gz |
Merge pull request #679 from jakirkham/fix_create_submodule
Store submodule name
Diffstat (limited to 'git')
-rw-r--r-- | git/objects/submodule/base.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py index a6b4caed..dc4ee3c6 100644 --- a/git/objects/submodule/base.py +++ b/git/objects/submodule/base.py @@ -358,7 +358,9 @@ class Submodule(IndexObject, Iterable, Traversable): if sm.exists(): # reretrieve submodule from tree try: - return repo.head.commit.tree[path] + sm = repo.head.commit.tree[path] + sm._name = name + return sm except KeyError: # could only be in index index = repo.index |