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.

format/commitgraph: Trim redundant MT-Safe's

Runxi Yu abce6092 2006e2e0

+6 -16
+1 -5
format/commitgraph/read/bloom.go
··· 8 8 ) 9 9 10 10 // HasBloom reports whether any layer has changed-path Bloom data. 11 - // 12 - // Labels: MT-Safe. 13 11 func (reader *Reader) HasBloom() bool { 14 12 for i := range reader.layers { 15 13 layer := &reader.layers[i] ··· 22 20 } 23 21 24 22 // BloomVersion returns the changed-path Bloom hash version, or 0 if absent. 25 - // 26 - // Labels: MT-Safe. 27 23 func (reader *Reader) BloomVersion() uint8 { 28 24 for i := len(reader.layers) - 1; i >= 0; i-- { 29 25 layer := &reader.layers[i] ··· 47 43 // 48 44 // Returns BloomUnavailableError when this commit graph has no Bloom data. 49 45 // 50 - // Labels: MT-Safe, Life-Parent. 46 + // Labels: Life-Parent. 51 47 func (reader *Reader) BloomFilterAt(pos Position) (bloom.Filter, error) { 52 48 layer, err := reader.layerByPosition(pos) 53 49 if err != nil {
+1 -1
format/commitgraph/read/commitat.go
··· 9 9 10 10 // CommitAt returns decoded commit-graph metadata at one position. 11 11 // 12 - // Labels: MT-Safe, Life-Independent. 12 + // Labels: Life-Independent. 13 13 func (reader *Reader) CommitAt(pos Position) (Commit, error) { 14 14 layer, err := reader.layerByPosition(pos) 15 15 if err != nil {
-2
format/commitgraph/read/commits.go
··· 15 15 } 16 16 17 17 // NumCommits returns total commits across loaded layers. 18 - // 19 - // Labels: MT-Safe. 20 18 func (reader *Reader) NumCommits() uint32 { 21 19 return reader.total 22 20 }
-2
format/commitgraph/read/hash.go
··· 9 9 ) 10 10 11 11 // HashVersion returns the commit-graph hash version. 12 - // 13 - // Labels: MT-Safe. 14 12 func (reader *Reader) HashVersion() uint8 { 15 13 return reader.hashVersion 16 14 }
+2 -2
format/commitgraph/read/iterators.go
··· 9 9 10 10 // AllPositions iterates all commit positions in native layer order. 11 11 // 12 - // Labels: MT-Safe, Life-Parent. 12 + // Labels: Life-Parent. 13 13 func (reader *Reader) AllPositions() iter.Seq[Position] { 14 14 return func(yield func(Position) bool) { 15 15 for layerIdx := range reader.layers { ··· 31 31 32 32 // AllOIDs iterates all commit object IDs in native layer order. 33 33 // 34 - // Labels: MT-Safe, Life-Parent. 34 + // Labels: Life-Parent. 35 35 func (reader *Reader) AllOIDs() iter.Seq[objectid.ObjectID] { 36 36 return func(yield func(objectid.ObjectID) bool) { 37 37 positions := reader.AllPositions()
+1 -1
format/commitgraph/read/layerinfo.go
··· 9 9 10 10 // Layers returns loaded layer metadata in native chain order. 11 11 // 12 - // Labels: MT-Safe, Life-Independent. 12 + // Labels: Life-Independent. 13 13 func (reader *Reader) Layers() []LayerInfo { 14 14 out := make([]LayerInfo, 0, len(reader.layers)) 15 15 for i := range reader.layers {
-2
format/commitgraph/read/lookup.go
··· 6 6 ) 7 7 8 8 // Lookup resolves one object ID to one graph position. 9 - // 10 - // Labels: MT-Safe. 11 9 func (reader *Reader) Lookup(oid objectid.ObjectID) (Position, error) { 12 10 if oid.Algorithm() != reader.algo { 13 11 return Position{}, &NotFoundError{OID: oid}
+1 -1
format/commitgraph/read/oidat.go
··· 7 7 8 8 // OIDAt returns object ID at one position. 9 9 // 10 - // Labels: MT-Safe, Life-Independent. 10 + // Labels: Life-Independent. 11 11 func (reader *Reader) OIDAt(pos Position) (objectid.ObjectID, error) { 12 12 layer, err := reader.layerByPosition(pos) 13 13 if err != nil {