Commit 93bab0fe authored by Paul Eggert's avatar Paul Eggert omit bogus chatter if no .git

Problem reported by Angelo Graziosi in:
* (git_config): Do not execut 'git' if $do_git fails.
parent a0e3f715
...@@ -269,23 +269,23 @@ fi ...@@ -269,23 +269,23 @@ fi
git_config () git_config ()
{ {
$do_git || return
name=$1 name=$1
value=$2 value=$2
ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || { ovalue=`git config --get "$name"` && test "$ovalue" = "$value" || {
if $do_git; then if $git_was_ok; then
if $git_was_ok; then echo 'Configuring local git repository...'
echo 'Configuring local git repository...' case $cp_options in
case $cp_options in --backup=*)
--backup=*) config=$git_common_dir/config
config=$git_common_dir/config cp $cp_options --force -- "$config" "$config" || exit;;
cp $cp_options --force -- "$config" "$config" || exit;; esac
esac fi
fi echo "git config $name '$value'"
echo "git config $name '$value'" git config "$name" "$value" || exit
git config "$name" "$value" || exit git_was_ok=false
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment