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

Method marshal

config/modules.go:121–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

119}
120
121func (m *Submodule) marshal() *format.Subsection {
122 if m.raw == nil {
123 m.raw = &format.Subsection{}
124 }
125
126 m.raw.Name = m.Name
127 if m.raw.Name == "" {
128 m.raw.Name = m.Path
129 }
130
131 m.raw.SetOption(pathKey, m.Path)
132 m.raw.SetOption(urlKey, m.URL)
133
134 if m.Branch != "" {
135 m.raw.SetOption(branchKey, m.Branch)
136 }
137
138 return m.raw
139}

Callers 1

MarshalMethod · 0.45

Calls 1

SetOptionMethod · 0.45

Tested by

no test coverage detected