diff options
Diffstat (limited to 'ref')
| -rw-r--r-- | ref/store/files/resolve_list_test.go | 2 | ||||
| -rw-r--r-- | ref/store/files/update_validate.go | 4 |
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: |
