From 073832fae2972ba5507fc0703a28acc2fb9b8216 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 30 Nov 2017 17:43:08 -0200 Subject: Do not output differences at git-config-{save,restore} --- git-config-save | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/git-config-save b/git-config-save index d7d12e9..9e742d1 100755 --- a/git-config-save +++ b/git-config-save @@ -71,7 +71,8 @@ function git_config_save { mkdir -p $BASE/$ID # Make a backup - if [ -f "$BASE/$ID/config" ] && ! diff .git/config $BASE/$ID/config; then + if [ -f "$BASE/$ID/config" ] && ! diff .git/config $BASE/$ID/config &> /dev/null; then + echo "Differences detected at `pwd`, making a backup..." cp $BASE/$ID/config $BASE/$ID/config.$DATE fi @@ -104,7 +105,7 @@ function git_config_restore { fi # Make a backup - if ! diff .git/config $BASE/$ID/config; then + if ! diff .git/config $BASE/$ID/config &> /dev/null; then cp .git/config .git/config.$DATE else echo "Identical configs for `pwd`, skipping" -- cgit v1.2.3