From 28fd6c135e9116d39c245b094f320f2bf25df2f4 Mon Sep 17 00:00:00 2001 From: Steve Streeting Date: Mon, 17 Aug 2015 12:03:13 +0100 Subject: [PATCH] Add lfs.fetchrecentalways config option --- lfs/config.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lfs/config.go b/lfs/config.go index 04ddba11..e2802399 100644 --- a/lfs/config.go +++ b/lfs/config.go @@ -29,6 +29,8 @@ type FetchPruneConfig struct { // 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) FetchRecentCommitsDays int + // Whether to always fetch recent even without --recent + FetchRecentAlways bool // Number of days added to FetchRecent*; data outside combined window will be // deleted when prune is run. (default 3) PruneOffsetDays int @@ -246,6 +248,11 @@ func (c *Configuration) FetchPruneConfig() *FetchPruneConfig { 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 { n, err := strconv.Atoi(v) if err == nil && n > 0 {