]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
purge_packages: Add option to switch on/off git gc
authorKacper Kornet <draenog@pld-linux.org>
Sun, 24 Mar 2013 21:29:01 +0000 (21:29 +0000)
committerKacper Kornet <draenog@pld-linux.org>
Sun, 24 Mar 2013 23:01:13 +0000 (23:01 +0000)
purge-packages.sh

index aeced19f7176264c2eed0cb6d9a363e301c5733a..4b415c11163fa2159085d7af374b32ca61258d6f 100755 (executable)
@@ -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
This page took 0.093213 seconds and 4 git commands to generate.