From 88a37d65fcb2a4f7e4c40fecb3ab14c7a62c3bc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Date: Tue, 20 Sep 2011 20:53:26 +0200 Subject: [PATCH 07/11] Move pushd/popds within conditional to avoid needless exec. --- eclass/git-2.eclass | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eclass/git-2.eclass b/eclass/git-2.eclass index cc2cc95..a94dc7c 100644 --- a/eclass/git-2.eclass +++ b/eclass/git-2.eclass @@ -217,15 +217,15 @@ git-2_gc() { local args - pushd "${EGIT_DIR}" > /dev/null if [[ ${EGIT_REPACK} || ${EGIT_PRUNE} ]]; then + pushd "${EGIT_DIR}" > /dev/null ebegin "Garbage collecting the repository" [[ ${EGIT_PRUNE} ]] && args='--prune' debug-print "${FUNCNAME}: git gc ${args}" git gc ${args} eend $? + popd > /dev/null fi - popd > /dev/null } # @FUNCTION: git-2_prepare_storedir -- 1.7.6.1