From: Rudolf Polzer Date: Wed, 27 Jul 2011 17:50:16 +0000 (+0200) Subject: when fixing configs, bail out if the repo is somehow invalid X-Git-Tag: xonotic-v0.5.0~51 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=424371fc875a01260b08ed89336293b6281f38be;p=xonotic%2Fxonotic.git when fixing configs, bail out if the repo is somehow invalid --- diff --git a/all b/all index ce391b21..29928197 100755 --- a/all +++ b/all @@ -380,6 +380,10 @@ fix_upstream_rebase_mergefail() fix_git_config() { + if ! [ -d ".git" ]; then + $ECHO "Not a git repository. Bailing out to not cause damage." + exit 1 + fi verbose git config remote.origin.url "$1" if [ -n "$2" ]; then verbose git config remote.origin.pushurl "$2"