-27
knotserver/git/git.go
-27
knotserver/git/git.go
···
27
h plumbing.Hash
28
}
29
30
-
// TagReference is used to list both tag and non-annotated tags.
31
-
// Non-annotated tags should only contains a reference.
32
-
// Annotated tags should contain its reference and its tag information.
33
-
type TagReference struct {
34
-
ref *plumbing.Reference
35
-
tag *object.Tag
36
-
}
37
-
38
// infoWrapper wraps the property of a TreeEntry so it can export fs.FileInfo
39
// to tar WriteHeader
40
type infoWrapper struct {
···
367
func (i *infoWrapper) Sys() any {
368
return nil
369
}
370
-
371
-
func (t *TagReference) Name() string {
372
-
return t.ref.Name().Short()
373
-
}
374
-
375
-
func (t *TagReference) Message() string {
376
-
if t.tag != nil {
377
-
return t.tag.Message
378
-
}
379
-
return ""
380
-
}
381
-
382
-
func (t *TagReference) TagObject() *object.Tag {
383
-
return t.tag
384
-
}
385
-
386
-
func (t *TagReference) Hash() plumbing.Hash {
387
-
return t.ref.Hash()
388
-
}