From: Simon Ruderich Date: Sat, 15 Sep 2012 13:40:04 +0000 (+0200) Subject: setup.sh,gitconfig: Support old Git without diff --patience. X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=commitdiff_plain;h=2eef5463417d581034bfbacb016114d0a5be3434 setup.sh,gitconfig: Support old Git without diff --patience. --- diff --git a/gitconfig.m4 b/gitconfig.m4 index 0aaf9c0..7d8d6c4 100644 --- a/gitconfig.m4 +++ b/gitconfig.m4 @@ -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 diff --git a/setup.sh b/setup.sh index d59568f..0ef9e6a 100755 --- a/setup.sh +++ b/setup.sh @@ -21,8 +21,15 @@ . ../lib.sh if installed git; then + # 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