]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Merge remote-tracking branch 'asp/master'
authorSimon Ruderich <simon@ruderich.org>
Thu, 27 Sep 2012 11:01:05 +0000 (13:01 +0200)
committerSimon Ruderich <simon@ruderich.org>
Thu, 27 Sep 2012 11:01:05 +0000 (13:01 +0200)
gitconfig.m4
setup.sh

index 32bb9cff67608e4c6a8b415a4dffab3100199b1e..e865454ee72ba7ee5526fc34fd1b53f9610af522 100644 (file)
@@ -56,16 +56,16 @@ include(../lib.m4)
        # Local.
        c   = commit --verbose
        ci  = commit --verbose
-       d   = diff --patience
-       di  = diff --patience
-       dw  = diff --patience --color-words
-       dc  = diff --patience --cached
-       dcw = diff --patience --cached --color-words
+       d   = diff PATIENCE
+       di  = diff PATIENCE
+       dw  = diff PATIENCE --color-words
+       dc  = diff PATIENCE --cached
+       dcw = diff PATIENCE --cached --color-words
        s   = status
        st  = status
        l   = log
        ls  = log --stat
-       lp  = log --patch --patience
+       lp  = log --patch PATIENCE
        a   = add
        ap  = add --patch
        au  = add --update
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