diff options
| author | Paul Eggert | 2016-02-01 08:29:28 -0800 |
|---|---|---|
| committer | Paul Eggert | 2016-02-01 08:30:02 -0800 |
| commit | d766ca8ff1e4ff1a30385508e1f456fad6bfe9f8 (patch) | |
| tree | 0623452938cd004e97e870a0c23c91c0886d36aa | |
| parent | 3b734e1273220596485f2dcbdb3be916eba53047 (diff) | |
| download | emacs-d766ca8ff1e4ff1a30385508e1f456fad6bfe9f8.tar.gz emacs-d766ca8ff1e4ff1a30385508e1f456fad6bfe9f8.zip | |
Chatter when autogen.sh changes Git configuration
* autogen.sh (git_config): New function. Use it instead of ‘git config’.
| -rwxr-xr-x | autogen.sh | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/autogen.sh b/autogen.sh index 877bb8476f7..42a779ea8c8 100755 --- a/autogen.sh +++ b/autogen.sh | |||
| @@ -220,17 +220,32 @@ echo timestamp > src/stamp-h.in || exit | |||
| 220 | ## Configure Git, if using Git. | 220 | ## Configure Git, if using Git. |
| 221 | if test -d .git && (git status -s) >/dev/null 2>&1; then | 221 | if test -d .git && (git status -s) >/dev/null 2>&1; then |
| 222 | 222 | ||
| 223 | # Like 'git config NAME VALUE', but verbose on change and exit on failure. | ||
| 224 | |||
| 225 | git_config () | ||
| 226 | { | ||
| 227 | name=$1 | ||
| 228 | value=$2 | ||
| 229 | ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || { | ||
| 230 | echo "${Configuring_git}git config $name '$value'" | ||
| 231 | Configuring_git= | ||
| 232 | git config "$name" "$value" || exit | ||
| 233 | } | ||
| 234 | } | ||
| 235 | Configuring_git='Configuring git... | ||
| 236 | ' | ||
| 237 | |||
| 223 | # Check hashes when transferring objects among repositories. | 238 | # Check hashes when transferring objects among repositories. |
| 224 | 239 | ||
| 225 | git config transfer.fsckObjects true || exit | 240 | git_config transfer.fsckObjects true |
| 226 | 241 | ||
| 227 | 242 | ||
| 228 | # Configure 'git diff' hunk header format. | 243 | # Configure 'git diff' hunk header format. |
| 229 | 244 | ||
| 230 | git config 'diff.elisp.xfuncname' \ | 245 | git_config 'diff.elisp.xfuncname' \ |
| 231 | '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' || exit | 246 | '^\(def[^[:space:]]+[[:space:]]+([^()[:space:]]+)' |
| 232 | git config 'diff.texinfo.xfuncname' \ | 247 | git_config 'diff.texinfo.xfuncname' \ |
| 233 | '^@node[[:space:]]+([^,[:space:]][^,]+)' || exit | 248 | '^@node[[:space:]]+([^,[:space:]][^,]+)' |
| 234 | 249 | ||
| 235 | 250 | ||
| 236 | # Install Git hooks. | 251 | # Install Git hooks. |