aboutsummaryrefslogtreecommitdiff
path: root/refs.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2025-11-16 00:00:00 +0000
committerGravatar Runxi Yu2025-11-16 00:00:00 +0000
commitbd91bf5f3bcffe5d1023ab9a37e4a9425830aba9 (patch)
treee6e9fb33bfa5c455a824f0af065c54529d357c0c /refs.go
parentRevert "hash: Generic hash-algorithm API" (diff)
signature
hash: Make fewer helper functions need explicit hash length fields
Diffstat (limited to 'refs.go')
-rw-r--r--refs.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/refs.go b/refs.go
index b543a842..36f7a962 100644
--- a/refs.go
+++ b/refs.go
@@ -29,7 +29,7 @@ func (repo *Repository) resolveLooseRef(refname string) (Hash, error) {
return Hash{}, err
}
line := strings.TrimSpace(string(data))
- id, err := ParseHashWithSize(line, repo.HashSize)
+ id, err := repo.ParseHash(line)
if err != nil {
return Hash{}, err
}
@@ -61,7 +61,7 @@ func (repo *Repository) resolvePackedRef(refname string) (Hash, error) {
name := line[sp+1:]
if bytes.Equal(name, want) {
hex := string(line[:sp])
- id, err := ParseHashWithSize(hex, repo.HashSize)
+ id, err := repo.ParseHash(hex)
if err != nil {
return Hash{}, err
}