From 75cb4bf7c4070c9ed5fb446f5cdadfb652cd9eaa Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Tue, 9 Jun 2020 21:18:04 -0700 Subject: [PATCH] gc-util-functions: move default packing options into library Avoid duplicating the default packing options by moving them into the common gc-util-functions.sh script library. Signed-off-by: Kyle J. McKay --- jobd/gc-git-svn.sh | 18 ------------------ jobd/gc-util-functions.sh | 18 ++++++++++++++++++ jobd/gc.sh | 4 ---- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/jobd/gc-git-svn.sh b/jobd/gc-git-svn.sh index a4fba54..1b8aa6d 100755 --- a/jobd/gc-git-svn.sh +++ b/jobd/gc-git-svn.sh @@ -32,24 +32,6 @@ umask 002 v_get_proj_from_dir proj proj="${proj%.git}" -# packing options -packopts="--depth=50 --window=50 --window-memory=${var_window_memory:-1g}" -quiet="-q"; [ "${show_progress:-0}" = "0" ] || quiet= - -# pack any existing, non-packed loose objects into a new _l.pack file then run prune-packed -# note that prune-packed is NOT run beforehand -- the caller must do that if needed -# loose objects need not be part of complete commits/trees as --weak-naming is used -pack_incremental_loose_objects() { - _lpacks="$(run_combine_packs /dev/null | LC_ALL=C wc -l) )) [ ${_objs:-0} -ge 5 ] } + +# pack any existing, non-packed loose objects into a new _l.pack file then run prune-packed +# note that prune-packed is NOT run beforehand -- the caller must do that if needed +# loose objects need not be part of complete commits/trees as --weak-naming is used +pack_incremental_loose_objects() { + _lpacks="$(run_combine_packs