MCPcopy
hub / github.com/git-lfs/git-lfs / WrapRepo

Function WrapRepo

t/cmd/util/testutils.go:245–258  ·  view source on GitHub ↗

WrapRepo creates a new Repo instance for an existing git repo

(c RepoCallback, path string)

Source from the content-addressed store, hash-verified

243
244// WrapRepo creates a new Repo instance for an existing git repo
245func WrapRepo(c RepoCallback, path string) *Repo {
246 cfg := config.NewIn(path, "")
247 return &Repo{
248 Path: path,
249 GitDir: cfg.LocalGitDir(),
250 Settings: &RepoCreateSettings{
251 RepoType: RepoTypeNormal,
252 },
253 callback: c,
254 cfg: cfg,
255 gitfilter: lfs.NewGitFilter(cfg),
256 fs: cfg.Filesystem(),
257 }
258}
259
260// Simplistic fire & forget running of git command - returns combined output
261func RunGitCommand(callback RepoCallback, failureCheck bool, args ...string) string {

Callers 1

mainFunction · 0.85

Calls 4

NewInFunction · 0.92
NewGitFilterFunction · 0.92
LocalGitDirMethod · 0.80
FilesystemMethod · 0.45

Tested by

no test coverage detected