# 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
. ../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
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