Fast implementation of Git in pure Go codeberg.org/lindenii/furgit
git go
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

object/fetch: Remove peel to tag functions

They were meaningless and confusing

Runxi Yu 1999e34a 6634953a

-44
-14
object/fetch/peel_to_tag.go
··· 1 - package fetch 2 - 3 - import ( 4 - objectid "codeberg.org/lindenii/furgit/object/id" 5 - "codeberg.org/lindenii/furgit/object/stored" 6 - "codeberg.org/lindenii/furgit/object/tag" 7 - ) 8 - 9 - // PeelToTag returns the tag at id without further peeling. 10 - // 11 - // Labels: Life-Parent. 12 - func (r *Fetcher) PeelToTag(id objectid.ObjectID) (*stored.Stored[*tag.Tag], error) { 13 - return r.ExactTag(id) 14 - }
-8
object/fetch/peel_to_tag_id.go
··· 1 - package fetch 2 - 3 - import objectid "codeberg.org/lindenii/furgit/object/id" 4 - 5 - // PeelToTagID returns id unchanged. 6 - func (r *Fetcher) PeelToTagID(id objectid.ObjectID) (objectid.ObjectID, error) { 7 - return id, nil 8 - }
-22
object/fetch/peel_to_tag_reader.go
··· 1 - package fetch 2 - 3 - import ( 4 - "io" 5 - 6 - objectid "codeberg.org/lindenii/furgit/object/id" 7 - ) 8 - 9 - // PeelToTagReader returns a reader for the content of the tag at id, 10 - // together with its content size in bytes. 11 - // 12 - // Usage of this method is unusual. 13 - // 14 - // Labels: Life-Parent, Close-Caller. 15 - func (r *Fetcher) PeelToTagReader(id objectid.ObjectID) (io.ReadCloser, int64, error) { 16 - tagID, err := r.PeelToTagID(id) 17 - if err != nil { 18 - return nil, 0, err 19 - } 20 - 21 - return r.ExactTagReader(tagID) 22 - }