diff options
author | John Kirkham <kirkhamj@janelia.hhmi.org> | 2017-10-01 22:27:52 -0400 |
---|---|---|
committer | John Kirkham <kirkhamj@janelia.hhmi.org> | 2017-10-01 22:27:52 -0400 |
commit | f2b820f936132d460078b47e8de72031661f848c (patch) | |
tree | 0791bc13ac54f8ec23a808ae3adaeb57a2dbcd34 /git | |
parent | d2ce49598a25b48ad0ab38cc1101c5e2a42a918e (diff) | |
download | gitpython-f2b820f936132d460078b47e8de72031661f848c.tar.gz |
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 |