aboutsummaryrefslogtreecommitdiff
path: root/ref/direct.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-06-06 21:27:52 +0000
committerGravatar Runxi Yu2026-06-06 21:27:52 +0000
commitb7420870269fe33bf2c12c82488f761e52308ecd (patch)
tree63206b8a917b37ca59ec0c5133f790f041afb18f /ref/direct.go
parentLabel fixes (diff)
signatureNo signature
ref: detached -> direct
Diffstat (limited to 'ref/direct.go')
-rw-r--r--ref/direct.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/ref/direct.go b/ref/direct.go
new file mode 100644
index 00000000..758ff992
--- /dev/null
+++ b/ref/direct.go
@@ -0,0 +1,24 @@
+package ref
+
+import objectid "lindenii.org/go/furgit/object/id"
+
+// Direct points directly to an object ID.
+//
+// Labels: MT-Unsafe.
+type Direct struct {
+ RefName string
+ ID objectid.ObjectID
+
+ // Peeled is the peeled target when available (for annotated tags).
+ //
+ // This field is optional backend-provided metadata. Backends that do not
+ // have peel metadata available may leave it nil.
+ Peeled *objectid.ObjectID
+}
+
+// Name returns the fully-qualified reference name.
+func (ref Direct) Name() string {
+ return ref.RefName
+}
+
+func (Direct) isRef() {}