Skip to content

Commit 58c18b1

Browse files
committed
subpath should use sub.Config().Name, not .Path.
The git config for submodules is pretty confusing. .Name corresponds to the path of the module's gitdir under .git/modules, while .Path corresponds to the path of the module's worktree relative to the parent. We want the former.
1 parent 810f8be commit 58c18b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subtrac.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ func (c *Cache) allSubrepos() (paths []string, repos []*git.Repository, err erro
388388
if subpath != "" {
389389
subpath += "/modules/"
390390
}
391-
subpath += sub.Config().Path
391+
subpath += sub.Config().Name
392392

393393
ss, err := sub.Status()
394394
if err != nil {

0 commit comments

Comments
 (0)