aboutsummaryrefslogtreecommitdiff
path: root/pack_idx.go
diff options
context:
space:
mode:
Diffstat (limited to 'pack_idx.go')
-rw-r--r--pack_idx.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pack_idx.go b/pack_idx.go
index 68170ad3..d84bb5ec 100644
--- a/pack_idx.go
+++ b/pack_idx.go
@@ -244,8 +244,8 @@ func (pi *packIndex) lookup(id Hash) (packlocation, error) {
if err != nil {
return packlocation{}, err
}
- if id.size != pi.repo.hashSize {
- return packlocation{}, fmt.Errorf("furgit: hash size mismatch: got %d, expected %d", id.size, pi.repo.hashSize)
+ if id.algo != pi.repo.hashAlgo {
+ return packlocation{}, fmt.Errorf("furgit: hash algorithm mismatch: got %s, expected %s", id.algo.String(), pi.repo.hashAlgo.String())
}
first := int(id.data[0])
var lo int