Config was skipping fetch settings when 0, must read & set 0's
This commit is contained in:
parent
66e92b0b7d
commit
5a9aaa557f
@ -227,7 +227,7 @@ func (c *Configuration) FetchPruneConfig() *FetchPruneConfig {
|
|||||||
}
|
}
|
||||||
if v, ok := c.GitConfig("lfs.fetchrecentrefsdays"); ok {
|
if v, ok := c.GitConfig("lfs.fetchrecentrefsdays"); ok {
|
||||||
n, err := strconv.Atoi(v)
|
n, err := strconv.Atoi(v)
|
||||||
if err == nil && n > 0 {
|
if err == nil && n >= 0 {
|
||||||
c.fetchPruneConfig.FetchRecentRefsDays = n
|
c.fetchPruneConfig.FetchRecentRefsDays = n
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -244,7 +244,7 @@ func (c *Configuration) FetchPruneConfig() *FetchPruneConfig {
|
|||||||
}
|
}
|
||||||
if v, ok := c.GitConfig("lfs.fetchrecentcommitsdays"); ok {
|
if v, ok := c.GitConfig("lfs.fetchrecentcommitsdays"); ok {
|
||||||
n, err := strconv.Atoi(v)
|
n, err := strconv.Atoi(v)
|
||||||
if err == nil && n > 0 {
|
if err == nil && n >= 0 {
|
||||||
c.fetchPruneConfig.FetchRecentCommitsDays = n
|
c.fetchPruneConfig.FetchRecentCommitsDays = n
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -255,7 +255,7 @@ func (c *Configuration) FetchPruneConfig() *FetchPruneConfig {
|
|||||||
}
|
}
|
||||||
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 {
|
||||||
c.fetchPruneConfig.PruneOffsetDays = n
|
c.fetchPruneConfig.PruneOffsetDays = n
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user