MCPcopy Index your code
hub / github.com/go-git/go-git / setRef

Method setRef

storage/filesystem/dotgit/dotgit_setref.go:13–19  ·  view source on GitHub ↗
(fileName, content string, old *plumbing.Reference)

Source from the content-addressed store, hash-verified

11)
12
13func (d *DotGit) setRef(fileName, content string, old *plumbing.Reference) (err error) {
14 if billy.CapabilityCheck(d.fs, billy.ReadAndWriteCapability) {
15 return d.setRefRwfs(fileName, content, old)
16 }
17
18 return d.setRefNorwfs(fileName, content, old)
19}
20
21func (d *DotGit) setRefRwfs(fileName, content string, old *plumbing.Reference) (err error) {
22 // If we are not checking an old ref, just truncate the file.

Callers 1

SetRefMethod · 0.95

Calls 2

setRefRwfsMethod · 0.95
setRefNorwfsMethod · 0.95

Tested by

no test coverage detected