aboutsummaryrefslogtreecommitdiff
path: root/ref/store/transaction.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-28 16:53:46 +0000
committerGravatar Runxi Yu2026-03-28 16:59:00 +0000
commit94a57d1621bec7a3e3e564cbef1d5d9b0cbc1441 (patch)
tree81aa2e20fbd948fc1f873a86d15d5d2e7b04450e /ref/store/transaction.go
parentref: Consider casting to [Detached] or [Symbolic]. (diff)
signatureNo signature
ref/store: Clarify contract
Diffstat (limited to 'ref/store/transaction.go')
-rw-r--r--ref/store/transaction.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/ref/store/transaction.go b/ref/store/transaction.go
index a70cd3d4..30f6ab50 100644
--- a/ref/store/transaction.go
+++ b/ref/store/transaction.go
@@ -13,6 +13,8 @@ import objectid "codeberg.org/lindenii/furgit/object/id"
//
// Symbolic methods operate on the named reference directly, without
// dereferencing symbolic refs.
+//
+// Labels: MT-Unsafe.
type Transaction interface {
// Create creates one detached reference, requiring that the logical
// reference does not already exist.
@@ -41,10 +43,10 @@ type Transaction interface {
// Commit validates and applies all queued operations atomically.
//
- // Commit is terminal. Further use of the transaction is undefined behavior.
+ // Commit invalidates the receiver.
Commit() error
// Abort abandons the transaction and releases any resources it holds.
//
- // Abort is terminal. Further use of the transaction is undefined behavior.
+ // Abort invalidates the receiver.
Abort() error
}