Method
newSubmodule
(fromModules, fromConfig *config.Submodule)
Source from the content-addressed store, hash-verified
| 804 | } |
| 805 | |
| 806 | func (w *Worktree) newSubmodule(fromModules, fromConfig *config.Submodule) *Submodule { |
| 807 | m := &Submodule{w: w} |
| 808 | m.initialized = fromConfig != nil |
| 809 | |
| 810 | if !m.initialized { |
| 811 | m.c = fromModules |
| 812 | return m |
| 813 | } |
| 814 | |
| 815 | m.c = fromConfig |
| 816 | m.c.Path = fromModules.Path |
| 817 | return m |
| 818 | } |
| 819 | |
| 820 | func (w *Worktree) isSymlink(path string) bool { |
| 821 | if s, err := w.Filesystem.Lstat(path); err == nil { |
Tested by
no test coverage detected