MCPcopy Index your code
hub / github.com/go-git/go-git / newSubmodule

Method newSubmodule

worktree.go:779–791  ·  view source on GitHub ↗
(fromModules, fromConfig *config.Submodule)

Source from the content-addressed store, hash-verified

777}
778
779func (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
793func (w *Worktree) isSymlink(path string) bool {
794 if s, err := w.Filesystem.Lstat(path); err == nil {

Callers 1

SubmodulesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected