From: Oleg Broytman Date: Sat, 11 Mar 2017 19:03:36 +0000 (+0300) Subject: Fix recursive gc/repack/fsck X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=6b688da4c74af2eeadc7bc29412c8a8ef25e5016;p=git-scripts.git Fix recursive gc/repack/fsck --- 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