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

Method TemporalFilesystem

common_test.go:174–191  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

172}
173
174func (s *BaseSuite) TemporalFilesystem() (fs billy.Filesystem, clean func()) {
175 fs = osfs.New(os.TempDir())
176 path, err := util.TempDir(fs, "", "")
177 if err != nil {
178 panic(err)
179 }
180
181 fs, err = fs.Chroot(path)
182 if err != nil {
183 panic(err)
184 }
185
186 clean = func() {
187 _ = util.RemoveAll(fs, path)
188 }
189
190 return
191}
192
193type SuiteCommon struct{}
194

Calls 1

ChrootMethod · 0.80

Tested by

no test coverage detected