MCPcopy Create free account
hub / github.com/entireio/git-sync / Error

Method Error

internal/gitproto/push.go:180–185  ·  view source on GitHub ↗

Error is safe on a zero-value/externally-constructed RefRejectedError (one with no wrapped err), so embedders can build &RefRejectedError{Ref, Reason} in tests without a nil panic.

()

Source from the content-addressed store, hash-verified

178// with no wrapped err), so embedders can build &RefRejectedError{Ref, Reason}
179// in tests without a nil panic.
180func (e *RefRejectedError) Error() string {
181 if e.err == nil {
182 return fmt.Sprintf("ref %s rejected: %s", e.Ref, e.Reason)
183 }
184 return e.err.Error()
185}
186
187// Unwrap exposes the underlying receive-pack error so existing
188// errors.As(*packp.CommandStatusErr) checks — and substring inspection of the

Calls

no outgoing calls