#! /bin/sh
prog_dir="`dirname \"$0\"`" &&
+"$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
+if [ -f .gitmodules ]; then
+ exec git submodule foreach "$prog_dir"/gc-not-packed
+fi
#! /bin/sh
prog_dir="`dirname \"$0\"`" &&
+"$prog_dir"/gc-repack &&
-"$prog_dir"/gc-repack || exit 1
-git submodule foreach "$prog_dir"/gc-repack
-exit 0 # Ignore errors from git submodule in bare repos
+if [ -f .gitmodules ]; then
+ exec git submodule foreach "$prog_dir"/gc-repack
+fi
# Call set-commit-date on the repo and all submodules
prog_dir="`dirname \"$0\"`" &&
-
"$prog_dir"/set-commit-date.py && \
-exec git submodule foreach "$prog_dir"/set-commit-date.py
+
+if [ -f .gitmodules ]; then
+ exec git submodule foreach "$prog_dir"/set-commit-date.py
+fi