MCPcopy Create free account
hub / github.com/go-git/go-git / newSubmodule

Method newSubmodule

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

Source from the content-addressed store, hash-verified

804}
805
806func (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
820func (w *Worktree) isSymlink(path string) bool {
821 if s, err := w.Filesystem.Lstat(path); err == nil {

Callers 1

SubmodulesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected