[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 93bab0f: autogen.sh: omit bogus chatter if no .git
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 93bab0f: autogen.sh: omit bogus chatter if no .git |
Date: |
Thu, 7 Sep 2017 03:11:01 -0400 (EDT) |
branch: master
commit 93bab0fe55df0f94144f5a12132639e831961848
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
autogen.sh: omit bogus chatter if no .git
Problem reported by Angelo Graziosi in:
http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00045.html
* autogen.sh (git_config): Do not execut 'git' if $do_git fails.
---
autogen.sh | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/autogen.sh b/autogen.sh
index 0d00d56..b3c5f48 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -269,23 +269,23 @@ fi
git_config ()
{
+ $do_git || return
+
name=$1
value=$2
ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || {
- if $do_git; then
- if $git_was_ok; then
- echo 'Configuring local git repository...'
- case $cp_options in
- --backup=*)
- config=$git_common_dir/config
- cp $cp_options --force -- "$config" "$config" || exit;;
- esac
- fi
- echo "git config $name '$value'"
- git config "$name" "$value" || exit
- fi
- git_was_ok=false
+ if $git_was_ok; then
+ echo 'Configuring local git repository...'
+ case $cp_options in
+ --backup=*)
+ config=$git_common_dir/config
+ cp $cp_options --force -- "$config" "$config" || exit;;
+ esac
+ fi
+ echo "git config $name '$value'"
+ git config "$name" "$value" || exit
+ git_was_ok=false
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 93bab0f: autogen.sh: omit bogus chatter if no .git,
Paul Eggert <=