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.
This commit is contained in:
parent
a0e3f715fc
commit
93bab0fe55
1 changed files with 13 additions and 13 deletions
26
autogen.sh
26
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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue