diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2019-01-14 08:37:31 -0500 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2019-01-14 08:37:31 -0500 |
commit | 95371735efb8b925da1200592b971609e0117afd (patch) | |
tree | f2910f2213ce7611f03fb7e6cb59aff85ef9f12d | |
parent | 4f84116b066b57b48940974a78e4092c9b8cc020 (diff) | |
download | grokmirror-95371735efb8b925da1200592b971609e0117afd.tar.gz |
Properly deal with grandchildren repos and -k
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-x | grokmirror/fsck.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/grokmirror/fsck.py b/grokmirror/fsck.py index b021015..5b3216b 100755 --- a/grokmirror/fsck.py +++ b/grokmirror/fsck.py @@ -128,9 +128,6 @@ def run_git_repack(fullpath, config, level=1): is_precious = True set_precious_objects(fullpath) - if not is_precious: - repack_flags.append('-k') - # are we using alternates ourselves? Multiple levels of alternates are # a bad idea in general due high possibility of corruption. if os.path.exists(os.path.join(fullpath, 'objects', 'info', 'alternates')): @@ -140,6 +137,9 @@ def run_git_repack(fullpath, config, level=1): repack_flags.append('-l') else: repack_flags.append('-a') + if not is_precious: + repack_flags.append('-k') + if level > 1: logger.info(' repack : performing a full repack for optimal deltas') repack_flags += full_repack_flags |