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

Function objectExists

remote.go:1079–1086  ·  view source on GitHub ↗
(s storer.EncodedObjectStorer, h plumbing.Hash)

Source from the content-addressed store, hash-verified

1077}
1078
1079func objectExists(s storer.EncodedObjectStorer, h plumbing.Hash) (bool, error) {
1080 _, err := s.EncodedObject(plumbing.AnyObject, h)
1081 if err == plumbing.ErrObjectNotFound {
1082 return false, nil
1083 }
1084
1085 return true, err
1086}
1087
1088func checkFastForwardUpdate(s storer.EncodedObjectStorer, remoteRefs storer.ReferenceStorer, cmd *packp.Command) error {
1089 if cmd.Old == plumbing.ZeroHash {

Callers 1

getWantsFunction · 0.85

Calls 1

EncodedObjectMethod · 0.65

Tested by

no test coverage detected