Add lfs.fetchrecentalways config option
This commit is contained in:
parent
168804370a
commit
28fd6c135e
@ -29,6 +29,8 @@ type FetchPruneConfig struct {
|
|||||||
// number of days prior to latest commit on a ref that we'll fetch previous
|
// number of days prior to latest commit on a ref that we'll fetch previous
|
||||||
// LFS changes too (default 3, 0 = only fetch at ref)
|
// LFS changes too (default 3, 0 = only fetch at ref)
|
||||||
FetchRecentCommitsDays int
|
FetchRecentCommitsDays int
|
||||||
|
// Whether to always fetch recent even without --recent
|
||||||
|
FetchRecentAlways bool
|
||||||
// Number of days added to FetchRecent*; data outside combined window will be
|
// Number of days added to FetchRecent*; data outside combined window will be
|
||||||
// deleted when prune is run. (default 3)
|
// deleted when prune is run. (default 3)
|
||||||
PruneOffsetDays int
|
PruneOffsetDays int
|
||||||
@ -246,6 +248,11 @@ func (c *Configuration) FetchPruneConfig() *FetchPruneConfig {
|
|||||||
c.fetchPruneConfig.FetchRecentCommitsDays = n
|
c.fetchPruneConfig.FetchRecentCommitsDays = n
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if v, ok := c.GitConfig("lfs.fetchrecentalways"); ok {
|
||||||
|
if v == "true" || v == "" {
|
||||||
|
c.fetchPruneConfig.FetchRecentAlways = true
|
||||||
|
}
|
||||||
|
}
|
||||||
if v, ok := c.GitConfig("lfs.pruneoffsetdays"); ok {
|
if v, ok := c.GitConfig("lfs.pruneoffsetdays"); ok {
|
||||||
n, err := strconv.Atoi(v)
|
n, err := strconv.Atoi(v)
|
||||||
if err == nil && n > 0 {
|
if err == nil && n > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user