diff options
| author | 2026-01-17 22:56:53 +0800 | |
|---|---|---|
| committer | 2026-01-17 22:56:53 +0800 | |
| commit | 7a0ab5f77917a36a87945f6a88b036b9b6ba88ee (patch) | |
| tree | 06947107af26e45bb5006276daa4b4d611f5dee2 /pack_pack.go | |
| parent | README: Clarify that the sha1 build tag is for testing only (diff) | |
| signature | No signature | |
hash: Key by algorithm, not size
Diffstat (limited to 'pack_pack.go')
| -rw-r--r-- | pack_pack.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pack_pack.go b/pack_pack.go index 8d0bb11f..6b8b356d 100644 --- a/pack_pack.go +++ b/pack_pack.go @@ -182,7 +182,7 @@ func (repo *Repository) packTypeSizeWithin(pf *packFile, ofs uint64, seen map[pa } var base Hash copy(base.data[:], pf.data[dataStart:hashEnd]) - base.size = repo.hashSize + base.algo = repo.hashAlgo loc, err := repo.packIndexFind(base) if err == nil { pf, err = repo.packFile(loc.PackPath) @@ -279,7 +279,7 @@ func (repo *Repository) packBodyResolveWithin(pf *packFile, ofs uint64) (ObjectT } var base Hash copy(base.data[:], pf.data[dataStart:hashEnd]) - base.size = repo.hashSize + base.algo = repo.hashAlgo delta, err := packSectionInflate(pf, hashEnd, 0) if err != nil { return fail(err) |
