aboutsummaryrefslogtreecommitdiff
path: root/ref/store
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-29 10:14:38 +0000
committerGravatar Runxi Yu2026-03-29 10:17:15 +0000
commit32f84b9d89d34ab74f8843f939f8d1d811d403ad (patch)
tree90786209ddd050ad2676a7d0404b78d8d278e1f2 /ref/store
parentobject/{id,header,signature,type}: Update docs (diff)
signatureNo signature
object/id: Split files
Diffstat (limited to 'ref/store')
-rw-r--r--ref/store/files/resolve_list_test.go2
-rw-r--r--ref/store/files/update_validate.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/ref/store/files/resolve_list_test.go b/ref/store/files/resolve_list_test.go
index e25a53f4..d52c5aa2 100644
--- a/ref/store/files/resolve_list_test.go
+++ b/ref/store/files/resolve_list_test.go
@@ -236,7 +236,7 @@ func TestFilesPackedRefsReadSemanticsMatchGit(t *testing.T) {
t.Fatalf("Resolve(tag) type = %T, want ref.Detached", tagRef)
}
- if tagDet.ID.Size() == 0 {
+ if tagDet.ID.Algorithm().Size() == 0 {
t.Fatal("Resolve(tag) returned zero object id")
}
})
diff --git a/ref/store/files/update_validate.go b/ref/store/files/update_validate.go
index cfbaca1d..ac3429aa 100644
--- a/ref/store/files/update_validate.go
+++ b/ref/store/files/update_validate.go
@@ -21,7 +21,7 @@ func (executor *refUpdateExecutor) validateQueuedUpdate(op queuedUpdate) error {
return wrapUpdateError(op.name, &refstore.InvalidNameError{Err: err})
}
- if op.newID.Size() == 0 {
+ if op.newID.Algorithm().Size() == 0 {
return wrapUpdateError(op.name, &refstore.InvalidValueError{Err: objectid.ErrInvalidAlgorithm})
}
case updateDelete, updateVerify:
@@ -30,7 +30,7 @@ func (executor *refUpdateExecutor) validateQueuedUpdate(op queuedUpdate) error {
return wrapUpdateError(op.name, &refstore.InvalidNameError{Err: err})
}
- if op.oldID.Size() == 0 {
+ if op.oldID.Algorithm().Size() == 0 {
return wrapUpdateError(op.name, &refstore.InvalidValueError{Err: objectid.ErrInvalidAlgorithm})
}
case updateCreateSymbolic, updateReplaceSymbolic: