gitfetch

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OriginFetchCache

type OriginFetchCache struct {
	// contains filtered or unexported fields
}

OriginFetchCache TTL-gates full origin fetches by common git dir.

func NewOriginFetchCache

func NewOriginFetchCache() *OriginFetchCache

NewOriginFetchCache returns an empty fetch TTL cache.

func (*OriginFetchCache) MarkBranchesSuccess

func (c *OriginFetchCache) MarkBranchesSuccess(commonDir string, branches []string)

MarkBranchesSuccess records a successful targeted fetch.

func (*OriginFetchCache) MarkFullSuccess

func (c *OriginFetchCache) MarkFullSuccess(commonDir string)

MarkFullSuccess records a successful full prune fetch.

func (*OriginFetchCache) NeedsFullFetch

func (c *OriginFetchCache) NeedsFullFetch(commonDir string, ttl time.Duration, fresh bool) bool

NeedsFullFetch reports whether a full git fetch --prune origin is required.

func (*OriginFetchCache) SetNow

func (c *OriginFetchCache) SetNow(now func() time.Time)

SetNow injects a clock for tests.

func (*OriginFetchCache) StaleBranches

func (c *OriginFetchCache) StaleBranches(commonDir string, ttl time.Duration, branches []string) []string

StaleBranches returns branches needing targeted refresh while full TTL is warm.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL