Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Store submodule name
  • Loading branch information
jakirkham committed Oct 2, 2017
commit f2b820f936132d460078b47e8de72031661f848c
4 changes: 3 additions & 1 deletion git/objects/submodule/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,9 @@ def add(cls, repo, name, path, url=None, branch=None, no_checkout=False):
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
Expand Down