summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-10-12 14:27:46 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-10-12 14:27:46 -0400
commit75c52e9162ed1d172242979532201ec08df84e3c (patch)
treed96e3d5f4da081149ff86db5da5a77d1e248f14b /Git
parent1c49e101b7454fb1fd83f468f28bfacb6c7194cf (diff)
repair: Prevent auto gc from happening when fetching from a remote.
Diffstat (limited to 'Git')
-rw-r--r--Git/Repair.hs15
1 files changed, 10 insertions, 5 deletions
diff --git a/Git/Repair.hs b/Git/Repair.hs
index 0769ecb30..77a592b4e 100644
--- a/Git/Repair.hs
+++ b/Git/Repair.hs
@@ -135,11 +135,16 @@ retrieveMissingObjects missing referencerepo r
pullremotes tmpr rmts fetchrefs (FsckFoundMissing stillmissing t)
, pullremotes tmpr rmts fetchrefs ms
)
- fetchfrom fetchurl ps = runBool $
- [ Param "fetch"
- , Param fetchurl
- , Params "--force --update-head-ok --quiet"
- ] ++ ps
+ fetchfrom fetchurl ps fetchr = runBool ps' fetchr'
+ where
+ ps' =
+ [ Param "fetch"
+ , Param fetchurl
+ , Params "--force --update-head-ok --quiet"
+ ] ++ ps
+ fetchr' = fetchr { gitGlobalOpts = gitGlobalOpts fetchr ++ nogc }
+ nogc = [ Param "-c", Param "gc.auto=0" ]
+
-- fetch refs and tags
fetchrefstags = [ Param "+refs/heads/*:refs/heads/*", Param "--tags"]
-- Fetch all available refs (more likely to fail,