aboutsummaryrefslogtreecommitdiff
path: root/loose.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2025-11-16 00:00:00 +0000
committerGravatar Runxi Yu2025-11-16 00:00:00 +0000
commit3bde7664e748dd648f58c0a5280612c239dc0870 (patch)
treeb16d6427a70f4e49f4c0b47eead8d420612123fb /loose.go
parentRemove repo.Root (diff)
Unexport Repository.HashSize
Diffstat (limited to 'loose.go')
-rw-r--r--loose.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/loose.go b/loose.go
index 7303e7be..b8e9b19e 100644
--- a/loose.go
+++ b/loose.go
@@ -14,8 +14,8 @@ const looseHeaderLimit = 4096
// loosePath returns the path for a loose object, validating hash size.
func (repo *Repository) loosePath(id Hash) (string, error) {
- if id.size != repo.HashSize {
- return "", fmt.Errorf("furgit: hash size mismatch: got %d, expected %d", id.size, repo.HashSize)
+ if id.size != repo.hashSize {
+ return "", fmt.Errorf("furgit: hash size mismatch: got %d, expected %d", id.size, repo.hashSize)
}
hex := id.String()
return filepath.Join("objects", hex[:2], hex[2:]), nil