From c3582889fd9132a91a74d483dd165ed65bad47c5 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 24 Oct 2013 01:09:26 +0200 Subject: [PATCH] setup.sh,gitconfig: Simplify fallback solution for --patience. --- gitconfig.in | 12 ++++++------ setup.sh | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) 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 -- 2.43.2