From d80b6dd94e728086435bddbf04edccda7d0505b4 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 2 Jun 2016 14:07:58 -0700 Subject: [PATCH] gc.sh: make sure combine-packs.sh finds correct binaries Signed-off-by: Kyle J. McKay --- jobd/gc.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/jobd/gc.sh b/jobd/gc.sh index 1b7023c..73d730f 100755 --- a/jobd/gc.sh +++ b/jobd/gc.sh @@ -67,6 +67,11 @@ is_dirty() { [ $_objs -ne 0 ] } +# make sure combine-packs uses the correct Git executable +run_combine_packs() { + PATH="$var_git_exec_path:$cfg_basedir/bin:$PATH" @basedir@/jobd/combine-packs.sh "$@" +} + # combine the input pack(s) into a new pack (or possibly packs if packSizeLimit set) # input pack names are read from standard input one per line delimited by the first # ':', ' ' or '\n' character on the line (which allows gfi-packs to be read directly) @@ -75,7 +80,7 @@ is_dirty() { combine_packs() { rm -f .gc_failed find objects/pack -maxdepth 1 -type f -name '*.zap*' -print0 | xargs -0 rm -f - @basedir@/jobd/combine-packs.sh --replace "$@" $packopts --all-progress-implied $quiet --non-empty || { + run_combine_packs --replace "$@" $packopts --all-progress-implied $quiet --non-empty || { >.gc_failed return 1 } @@ -120,7 +125,7 @@ make_svn_pack() { mv -f .svnpack .svnpackgc _newp="$(find objects/$octet -maxdepth 1 -type f -newer .svnpackgc -name "$octet19" -print 2>/dev/null | awk -F / '{print $2 $3}' | - @basedir@/jobd/combine-packs.sh --objects --names $packopts --incremental --all-progress-implied $quiet --non-empty)" || { + run_combine_packs --objects --names $packopts --incremental --all-progress-implied $quiet --non-empty)" || { mv -f .svnpackgc .svnpack >.gc_failed return 1 -- 2.11.4.GIT