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

Method Create

worktree_fs.go:52–57  ·  view source on GitHub ↗
(filename string)

Source from the content-addressed store, hash-verified

50}
51
52func (sfs *worktreeFilesystem) Create(filename string) (billy.File, error) {
53 if err := sfs.validPath(filename); err != nil {
54 return nil, fmt.Errorf("create: %w", err)
55 }
56 return sfs.Filesystem.Create(filename)
57}
58
59func (sfs *worktreeFilesystem) Open(filename string) (billy.File, error) {
60 if err := sfs.validReadPath(filename); err != nil {

Callers 15

createCommitFunction · 0.45
createDotGitFileFunction · 0.45
CommitNewFileFunction · 0.45
TestCheckoutKeepMethod · 0.45
TestResetMergeMethod · 0.45
TestResetHardMethod · 0.45
TestStatusModifiedMethod · 0.45

Calls 1

validPathMethod · 0.95

Tested by 15

createCommitFunction · 0.36
CommitNewFileFunction · 0.36
TestCheckoutKeepMethod · 0.36
TestResetMergeMethod · 0.36
TestResetHardMethod · 0.36
TestStatusModifiedMethod · 0.36
TestStatusIgnoredMethod · 0.36