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 b2aea86 commit 7bf90deCopy full SHA for 7bf90de
worktree.go
@@ -663,16 +663,19 @@ 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
+ return w.addIndexFromTreeEntry(name, e, idx)
676
677
- return w.addIndexFromTreeEntry(name, e, idx)
678
+ return ErrSubmoduleNotFound
679
case merkletrie.Insert:
680
mode, err := e.Mode.ToOSFileMode()
681
0 commit comments