aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Ryabitsev <konstantin@linuxfoundation.org>2019-01-14 08:37:31 -0500
committerKonstantin Ryabitsev <konstantin@linuxfoundation.org>2019-01-14 08:37:31 -0500
commit95371735efb8b925da1200592b971609e0117afd (patch)
treef2910f2213ce7611f03fb7e6cb59aff85ef9f12d
parent4f84116b066b57b48940974a78e4092c9b8cc020 (diff)
downloadgrokmirror-95371735efb8b925da1200592b971609e0117afd.tar.gz
Properly deal with grandchildren repos and -k
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-xgrokmirror/fsck.py6
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