From 6b688da4c74af2eeadc7bc29412c8a8ef25e5016 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 11 Mar 2017 22:03:36 +0300 Subject: [PATCH] Fix recursive gc/repack/fsck --- gc-and-repack-recursive | 5 +++-- gc-and-repack-repos | 4 +--- gc-not-packed-recursive | 5 +++-- gc-not-packed-repos | 4 +--- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/gc-and-repack-recursive b/gc-and-repack-recursive index 8106725..c401d55 100755 --- a/gc-and-repack-recursive +++ b/gc-and-repack-recursive @@ -2,5 +2,6 @@ prog_dir="`dirname \"$0\"`" && -"$prog_dir"/gc-and-repack && \ -exec git submodule foreach "$prog_dir"/gc-and-repack +"$prog_dir"/gc-and-repack || exit 1 +git submodule foreach "$prog_dir"/gc-and-repack +exit 0 # Ignore errors from git submodule in bare repos diff --git a/gc-and-repack-repos b/gc-and-repack-repos index c9f0bc1..2f6d731 100755 --- a/gc-and-repack-repos +++ b/gc-and-repack-repos @@ -6,7 +6,5 @@ prog_dir="`pwd`" && for d in `"$prog_dir"/ls-not-packed` do echo "----- $d -----" && cd "$d" && - test "$g" = "$d/.git" && - "$prog_dir"/gc-and-repack-recursive || - "$prog_dir"/gc-and-repack + "$prog_dir"/gc-and-repack-recursive || exit 1 done diff --git a/gc-not-packed-recursive b/gc-not-packed-recursive index c921386..46572cc 100755 --- a/gc-not-packed-recursive +++ b/gc-not-packed-recursive @@ -2,5 +2,6 @@ prog_dir="`dirname \"$0\"`" && -"$prog_dir"/gc-not-packed && \ -exec git submodule foreach "$prog_dir"/gc-not-packed +"$prog_dir"/gc-not-packed || exit 1 +git submodule foreach "$prog_dir"/gc-not-packed +exit 0 # Ignore errors from git submodule in bare repos diff --git a/gc-not-packed-repos b/gc-not-packed-repos index 4d25409..f7b7c78 100755 --- a/gc-not-packed-repos +++ b/gc-not-packed-repos @@ -6,7 +6,5 @@ prog_dir="`pwd`" && for d in `"$prog_dir"/ls-not-packed` do echo "----- $d -----" && cd "$d" && - test "$g" = "$d/.git" && - "$prog_dir"/gc-not-packed-recursive || - "$prog_dir"/gc-not-packed + "$prog_dir"/gc-not-packed-recursive || exit 1 done -- 2.39.5