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

Function buildEmptyPack

internal/gitproto/push.go:617–621  ·  view source on GitHub ↗
(algo crypto.Hash)

Source from the content-addressed store, hash-verified

615)
616
617func buildEmptyPack(algo crypto.Hash) []byte {
618 h := hash.New(algo)
619 _, _ = h.Write(emptyPackHeader)
620 return append(slices.Clone(emptyPackHeader), h.Sum(nil)...)
621}
622
623// emptyPack returns a valid packfile containing zero objects whose trailing
624// checksum matches the target's advertised object format: SHA-256 repositories

Callers 1

push.goFile · 0.85

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected