aboutsummaryrefslogtreecommitdiff
path: root/network/receivepack/service/apply.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-29 10:22:19 +0000
committerGravatar Runxi Yu2026-03-29 10:22:19 +0000
commitcdac77529a3f7416843b1d455d413c9b0f21cfff (patch)
tree274775de36c302716f43efdaffbb00ca5f3070f9 /network/receivepack/service/apply.go
parentobject/id: Split files (diff)
signatureNo signature
object/id: Zero is a property of the algorithm v0.1.140
Diffstat (limited to 'network/receivepack/service/apply.go')
-rw-r--r--network/receivepack/service/apply.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/network/receivepack/service/apply.go b/network/receivepack/service/apply.go
index 8fa500ca..aae61340 100644
--- a/network/receivepack/service/apply.go
+++ b/network/receivepack/service/apply.go
@@ -2,7 +2,6 @@ package service
import (
"codeberg.org/lindenii/furgit/internal/utils"
- objectid "codeberg.org/lindenii/furgit/object/id"
refstore "codeberg.org/lindenii/furgit/ref/store"
)
@@ -101,7 +100,7 @@ func queueWriteTransaction(tx refstore.Transaction, command Command) error {
return tx.Delete(command.Name, command.OldID)
}
- if command.OldID == objectid.Zero(command.OldID.Algorithm()) {
+ if command.OldID == command.OldID.Algorithm().Zero() {
return tx.Create(command.Name, command.NewID)
}
@@ -115,7 +114,7 @@ func queueWriteBatch(batch refstore.Batch, command Command) {
return
}
- if command.OldID == objectid.Zero(command.OldID.Algorithm()) {
+ if command.OldID == command.OldID.Algorithm().Zero() {
batch.Create(command.Name, command.NewID)
return