[packages/rpm-build-tools/purge: 2/2] purge_packages: Add option to switch on/off git gc
draenog
draenog at pld-linux.org
Mon Mar 25 00:02:02 CET 2013
commit 25e20df548cb8235e0ca882a61b638ee94cbf1ca
Author: Kacper Kornet <draenog at pld-linux.org>
Date: Sun Mar 24 21:29:01 2013 +0000
purge_packages: Add option to switch on/off git gc
purge-packages.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/purge-packages.sh b/purge-packages.sh
index aeced19..4b415c1 100755
--- a/purge-packages.sh
+++ b/purge-packages.sh
@@ -4,6 +4,8 @@
# - otherwise git gc is called
set -e
+CALL_GC='yes'
+
topdir=$(rpm -E %_topdir)
purgedir=$topdir/purged
cd "$topdir"
@@ -25,11 +27,11 @@ for pkg in */.git; do
# FIXME: does not currently handle if some pushes are not made!
if [ -n "$status" ] || [ -n "$stash" ]; then
cat <<-EOF
- * Package $pkg - Untracked files or stash not empty. Invoke gc
+ * Package $pkg - Untracked files or stash not empty.
$status
EOF
purge='no'
- git gc
+ [ "$CALL_GC" = 'yes' ] && git gc
fi
git show-ref --heads |\
{ while read sha1 branch; do
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/25e20df548cb8235e0ca882a61b638ee94cbf1ca
More information about the pld-cvs-commit
mailing list