From 424371fc875a01260b08ed89336293b6281f38be Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Wed, 27 Jul 2011 19:50:16 +0200 Subject: [PATCH] when fixing configs, bail out if the repo is somehow invalid --- all | 4 ++++ 1 file changed, 4 insertions(+) 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" -- 2.39.2