From: Michał Górny Date: Fri, 23 Sep 2011 13:58:09 +0000 (+0000) Subject: Move pushd/popds within conditional to avoid needless exec. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=efc63c367daafc3d0bd43335e69599542dfeb376;p=gentoo.git Move pushd/popds within conditional to avoid needless exec. --- diff --git a/eclass/git-2.eclass b/eclass/git-2.eclass index 6ca13b638e20..c973c7e429de 100644 --- a/eclass/git-2.eclass +++ b/eclass/git-2.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.20 2011/09/23 13:57:55 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/git-2.eclass,v 1.21 2011/09/23 13:58:09 mgorny Exp $ # @ECLASS: git-2.eclass # @MAINTAINER: @@ -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