Method
newSubmodule
(fromModules, fromConfig *config.Submodule)
Source from the content-addressed store, hash-verified
| 777 | } |
| 778 | |
| 779 | func (w *Worktree) newSubmodule(fromModules, fromConfig *config.Submodule) *Submodule { |
| 780 | m := &Submodule{w: w} |
| 781 | m.initialized = fromConfig != nil |
| 782 | |
| 783 | if !m.initialized { |
| 784 | m.c = fromModules |
| 785 | return m |
| 786 | } |
| 787 | |
| 788 | m.c = fromConfig |
| 789 | m.c.Path = fromModules.Path |
| 790 | return m |
| 791 | } |
| 792 | |
| 793 | func (w *Worktree) isSymlink(path string) bool { |
| 794 | if s, err := w.Filesystem.Lstat(path); err == nil { |
Tested by
no test coverage detected