MCPcopy Index your code
hub / github.com/go-git/go-git / GenerationV2Data

Method GenerationV2Data

plumbing/format/commitgraph/v2/commitgraph.go:32–37  ·  view source on GitHub ↗

GenerationV2Data returns the corrected commit date for the commits

()

Source from the content-addressed store, hash-verified

30
31// GenerationV2Data returns the corrected commit date for the commits
32func (c *CommitData) GenerationV2Data() uint64 {
33 if c.GenerationV2 == 0 || c.GenerationV2 == math.MaxUint64 {
34 return 0
35 }
36 return c.GenerationV2 - uint64(c.When.Unix())
37}
38
39// Index represents a representation of commit graph that allows indexed
40// access to the nodes using commit object hash

Callers 2

prepareMethod · 0.80
encodeCommitDataMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected