MCPcopy Create free account
hub / github.com/bufbuild/buf / NewGitRepoInputConfig

Function NewGitRepoInputConfig

private/bufpkg/bufconfig/input_config.go:176–198  ·  view source on GitHub ↗

NewGitRepoInputConfig returns an input config for a git repo.

(
	location string,
	subDir string,
	branch string,
	commitOrTag string,
	ref string,
	depth *uint32,
	recurseSubModules bool,
)

Source from the content-addressed store, hash-verified

174
175// NewGitRepoInputConfig returns an input config for a git repo.
176func NewGitRepoInputConfig(
177 location string,
178 subDir string,
179 branch string,
180 commitOrTag string,
181 ref string,
182 depth *uint32,
183 recurseSubModules bool,
184) (InputConfig, error) {
185 if location == "" {
186 return nil, errors.New("empty location for git repository")
187 }
188 return &inputConfig{
189 inputConfigType: InputConfigTypeGitRepo,
190 location: location,
191 subDir: subDir,
192 branch: branch,
193 commitOrTag: commitOrTag,
194 ref: ref,
195 depth: depth,
196 recurseSubmodules: recurseSubModules,
197 }, nil
198}
199
200// NewModuleInputConfig returns an input config for a module.
201func NewModuleInputConfig(

Callers 1

GetInputConfigForRefFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…