From 034069fb137c4ab6127e84b9c1df9f308d494764 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Wed, 1 Jun 2016 01:23:21 -0700 Subject: [PATCH] gc.sh: ignore pack files without an index Git ignores any pack files that do not have a matching .idx file so we need to do the same thing. Signed-off-by: Kyle J. McKay --- jobd/gc.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jobd/gc.sh b/jobd/gc.sh index ff0838a..c91dea5 100755 --- a/jobd/gc.sh +++ b/jobd/gc.sh @@ -384,12 +384,14 @@ fi newdeltas= if [ -f gfi-packs -a -s gfi-packs ] && is_gfi_mirror; then - if [ $(list_packs --count objects/pack) -le $(wc -l /dev/null || : +list_packs --exclude-no-idx objects/pack | xargs touch -c 2>/dev/null || : # We wish to keep deltas from our last full pack so if we're not redeltaing # then make sure the .pack associated with the .bitmap has a newer mod time # (If there is no .bitmap then touch the pack with the most objects instead.) -- 2.11.4.GIT