MCPcopy Create free account
hub / github.com/git-bug/git-bug / Increment

Method Increment

repository/gogit.go:901–907  ·  view source on GitHub ↗

Increment is equivalent to c = GetOrCreateClock(name) + c.Increment()

(name string)

Source from the content-addressed store, hash-verified

899
900// Increment is equivalent to c = GetOrCreateClock(name) + c.Increment()
901func (repo *GoGitRepo) Increment(name string) (lamport.Time, error) {
902 c, err := repo.GetOrCreateClock(name)
903 if err != nil {
904 return lamport.Time(0), err
905 }
906 return c.Increment()
907}
908
909// Witness is equivalent to c = GetOrCreateClock(name) + c.Witness(time)
910func (repo *GoGitRepo) Witness(name string, time lamport.Time) error {

Callers

nothing calls this directly

Calls 3

GetOrCreateClockMethod · 0.95
TimeTypeAlias · 0.92
IncrementMethod · 0.65

Tested by

no test coverage detected