[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 d766ca8: Chatter when autogen.sh changes Git conf
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] emacs-25 d766ca8: Chatter when autogen.sh changes Git configuration |
Date: |
Mon, 01 Feb 2016 16:30:06 +0000 |
branch: emacs-25
commit d766ca8ff1e4ff1a30385508e1f456fad6bfe9f8
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Chatter when autogen.sh changes Git configuration
* autogen.sh (git_config): New function. Use it instead of ‘git config’.
---
autogen.sh | 25 ++++++++++++++++++++-----
1 files changed, 20 insertions(+), 5 deletions(-)
diff --git a/autogen.sh b/autogen.sh
index 877bb84..42a779e 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -220,17 +220,32 @@ echo timestamp > src/stamp-h.in || exit
## Configure Git, if using Git.
if test -d .git && (git status -s) >/dev/null 2>&1; then
+ # Like 'git config NAME VALUE', but verbose on change and exit on failure.
+
+ git_config ()
+ {
+ name=$1
+ value=$2
+ ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || {
+ echo "${Configuring_git}git config $name '$value'"
+ Configuring_git=
+ git config "$name" "$value" || exit
+ }
+ }
+ Configuring_git='Configuring git...
+'
+
# Check hashes when transferring objects among repositories.
- git config transfer.fsckObjects true || exit
+ git_config transfer.fsckObjects true
# Configure 'git diff' hunk header format.
- git config 'diff.elisp.xfuncname' \
- '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' || exit
- git config 'diff.texinfo.xfuncname' \
- 'address@hidden:space:]]+([^,[:space:]][^,]+)' || exit
+ git_config 'diff.elisp.xfuncname' \
+ '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)'
+ git_config 'diff.texinfo.xfuncname' \
+ 'address@hidden:space:]]+([^,[:space:]][^,]+)'
# Install Git hooks.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 d766ca8: Chatter when autogen.sh changes Git configuration,
Paul Eggert <=