Commit 75511a19 authored by Tiago Gomes's avatar Tiago Gomes Committed by GitLab

Avoid running the git gc in the background

Avoid running the git garbage collector in the background on a temporary
that will be moved to a new place.

If the directory is moved before git gc completes its operation, the
repository may end up in a corrupted state.
parent c24b2c96
......@@ -136,6 +136,7 @@ def mirror(name, repo):
call(['wget', os.path.join(app.config['tar-url'], tar_file)],
stdout=fnull, stderr=fnull)
call(['tar', 'xf', tar_file], stderr=fnull)
call(['git', 'config', 'gc.autodetach', 'false'], stderr=fnull)
update_mirror(name, repo, tmpdir)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment