summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2016-02-18 12:46:35 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2016-02-23 13:09:06 +0000
commitc06dc5acf0e712827ca52d6611c3b13dab6744fd (patch)
treedcab439e06c2db35ea63081c7fcaaad361754848
parentedf957c5fe043f48219bdbcf6fe4cdec5edff640 (diff)
downloadlorry-c06dc5acf0e712827ca52d6611c3b13dab6744fd.tar.gz
Set 'gc.autodetach=false' for `git fetch`
This prevent git from running processes in the background. We were having issues when `git gc` was running automatically, making `git gc` call fail because it was already running. Change-Id: Iee3e8e29eb0697f5241c7de4744c8e080bfd8e28
-rwxr-xr-xlorry5
1 files changed, 3 insertions, 2 deletions
diff --git a/lorry b/lorry
index 43a58f7..6bca47a 100755
--- a/lorry
+++ b/lorry
@@ -319,8 +319,9 @@ class Lorry(cliapp.Application):
self.progress('.. initialising git dir')
self.run_program(['git', 'init', '--bare', gitdir])
self.progress('.. updating existing clone')
- argv = ['git', 'fetch', '--prune', spec['url'],
- '+refs/heads/*:refs/heads/*', '+refs/tags/*:refs/tags/*']
+ argv = ['git', '-c', 'gc.autodetach=false', 'fetch', '--prune',
+ spec['url'], '+refs/heads/*:refs/heads/*',
+ '+refs/tags/*:refs/tags/*']
self.run_program(argv, cwd=gitdir, env=env)
def gitify_bzr(self, project_name, dirname, gitdir, spec):