We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63343bf commit a2ba292Copy full SHA for a2ba292
worktree.go
@@ -663,14 +663,20 @@ func (w *Worktree) checkoutChangeSubmodule(name string,
663
) error {
664
switch a {
665
case merkletrie.Modify:
666
- sub, err := w.Submodule(name)
+ subs, err := w.Submodules()
667
if err != nil {
668
return err
669
}
670
-
671
- if !sub.initialized {
672
- return nil
+ for _, sub := range subs {
+ if sub.Config().Path == name {
+ if !sub.initialized {
673
+ return nil
674
+ }
675
+ goto found
676
677
678
+ return ErrSubmoduleNotFound
679
+ found:
680
681
return w.addIndexFromTreeEntry(name, e, idx)
682
case merkletrie.Insert:
0 commit comments