MCPcopy
hub / github.com/go-git/go-git / Open

Method Open

worktree_fs.go:59–64  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

57}
58
59func (sfs *worktreeFilesystem) Open(filename string) (billy.File, error) {
60 if err := sfs.validReadPath(filename); err != nil {
61 return nil, fmt.Errorf("open: %w", err)
62 }
63 return sfs.Filesystem.Open(filename)
64}
65
66func (sfs *worktreeFilesystem) OpenFile(filename string, flag int, perm os.FileMode) (billy.File, error) {
67 if err := sfs.validPath(filename); err != nil {

Callers 15

dotGitFileToOSFilesystemFunction · 0.45
dotGitCommonDirectoryFunction · 0.45
readGitmodulesFileMethod · 0.45
TestCheckoutMethod · 0.45
ExampleCloneFunction · 0.45
ExamplePlainCloneFunction · 0.45
mainFunction · 0.45
getCommitNodeIndexFunction · 0.45

Calls 1

validReadPathMethod · 0.95

Tested by 15

TestCheckoutMethod · 0.36
ExampleCloneFunction · 0.36
ExamplePlainCloneFunction · 0.36
assertInfoRefsFunction · 0.36
assertObjectPacksFunction · 0.36
TestCommitGraphMethod · 0.36
TestMixedGraphMethod · 0.36