From: Simon Ruderich Date: Wed, 23 Oct 2013 23:09:26 +0000 (+0200) Subject: setup.sh,gitconfig: Simplify fallback solution for --patience. X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=commitdiff_plain;h=c3582889fd9132a91a74d483dd165ed65bad47c5 setup.sh,gitconfig: Simplify fallback solution for --patience. --- diff --git a/gitconfig.in b/gitconfig.in index 14129c5..005114a 100644 --- a/gitconfig.in +++ b/gitconfig.in @@ -61,16 +61,16 @@ c = commit --verbose ca = commit --verbose --amend cad = commit --verbose --amend --date= - d = diff PATIENCE - dw = diff PATIENCE --color-words - dc = diff PATIENCE --cached - dcw = diff PATIENCE --cached --color-words + d = diff --patience + dw = diff --patience --color-words + dc = diff --patience --cached + dcw = diff --patience --cached --color-words ds = diff --stat s = status l = log ls = log --stat - lp = log --patch PATIENCE - lpw = log --patch PATIENCE --color-words + lp = log --patch --patience + lpw = log --patch --patience --color-words a = add ap = add --patch au = add --update diff --git a/setup.sh b/setup.sh index 0658537..ff01b10 100755 --- a/setup.sh +++ b/setup.sh @@ -24,14 +24,14 @@ set -e if installed git; then + generate gitconfig .in simple_cpp \ + PWD -- "`pwd`" + # Older Git versions don't support --patience. - PATIENCE= - if git diff --patience >/dev/null 2>&1; then - PATIENCE=--patience + if ! git diff --patience >/dev/null 2>&1; then + sed_i 's/--patience//' gitconfig fi - generate gitconfig .in simple_cpp \ - PATIENCE PWD -- "$PATIENCE" "`pwd`" link gitconfig ~/.gitconfig fi