diff options
author | Tiago Gomes <tiago.gomes@codethink.co.uk> | 2016-10-17 12:13:41 +0100 |
---|---|---|
committer | GitLab <gitlab@gitlab.com> | 2016-10-17 14:47:53 +0000 |
commit | 75511a194b258659c72fa099dca554e9dc180ed2 (patch) | |
tree | 39ba04c78c957e246208b74a886d86f89fedf1d8 | |
parent | c24b2c96c3732fcd6d0677583feb9dab10f68d32 (diff) | |
download | ybd-75511a194b258659c72fa099dca554e9dc180ed2.tar.gz |
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.
-rw-r--r-- | ybd/repos.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ybd/repos.py b/ybd/repos.py index 8225d54..c52adcc 100644 --- a/ybd/repos.py +++ b/ybd/repos.py @@ -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) os.remove(tar_file) update_mirror(name, repo, tmpdir) except: |