Chatter when autogen.sh changes Git configuration
* autogen.sh (git_config): New function. Use it instead of ‘git config’.
This commit is contained in:
parent
3b734e1273
commit
d766ca8ff1
1 changed files with 20 additions and 5 deletions
25
autogen.sh
25
autogen.sh
|
@ -220,17 +220,32 @@ echo timestamp > src/stamp-h.in || exit
|
||||||
## Configure Git, if using Git.
|
## Configure Git, if using Git.
|
||||||
if test -d .git && (git status -s) >/dev/null 2>&1; then
|
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.
|
# Check hashes when transferring objects among repositories.
|
||||||
|
|
||||||
git config transfer.fsckObjects true || exit
|
git_config transfer.fsckObjects true
|
||||||
|
|
||||||
|
|
||||||
# Configure 'git diff' hunk header format.
|
# Configure 'git diff' hunk header format.
|
||||||
|
|
||||||
git config 'diff.elisp.xfuncname' \
|
git_config 'diff.elisp.xfuncname' \
|
||||||
'^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' || exit
|
'^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)'
|
||||||
git config 'diff.texinfo.xfuncname' \
|
git_config 'diff.texinfo.xfuncname' \
|
||||||
'^@node[[:space:]]+([^,[:space:]][^,]+)' || exit
|
'^@node[[:space:]]+([^,[:space:]][^,]+)'
|
||||||
|
|
||||||
|
|
||||||
# Install Git hooks.
|
# Install Git hooks.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue