(algo crypto.Hash)
| 615 | ) |
| 616 | |
| 617 | func 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 |