]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - setup.sh
gitconfig: Add diff.wordregex for better git --color-words.
[config/dotfiles.git] / setup.sh
index bedc5bb214df55792a7f16934fb4df6c0848e969..0ef9e6af12dcdc7067a3195ef52abd6296a6ba98 100755 (executable)
--- a/setup.sh
+++ b/setup.sh
 . ../lib.sh
 
 if installed git; then
-    generate m4 gitconfig -DGITIGNORE=`pwd`/gitignore -DOS=`os`
+    # Older Git versions don't support --patience.
+    PATIENCE=
+    if git diff --patience >/dev/null 2>&1; then
+        PATIENCE=--patience
+    fi
+
+    generate m4 gitconfig \
+        -DGITIGNORE=`pwd`/gitignore \
+        -DPATIENCE="$PATIENCE" \
+        -DOS=`os`
     link gitconfig ~/.gitconfig
 fi
 
@@ -30,7 +39,9 @@ if installed tig; then
 fi
 
 if installed hg; then
-    generate m4 hgrc -DHGIGNORE=`pwd`/hgignore -DOS=`os`
+    generate m4 hgrc \
+        -DHGIGNORE=`pwd`/hgignore \
+        -DOS=`os`
     link hgrc ~/.hgrc
 fi