From: Simon Ruderich Date: Thu, 24 Oct 2013 00:06:16 +0000 (+0200) Subject: gitconfig: Add push.default = simple. X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=commitdiff_plain;h=917248b29e9f635f27a533034f655cc110e2cca7 gitconfig: Add push.default = simple. --- diff --git a/gitconfig.in b/gitconfig.in index cf6e169..a04b757 100644 --- a/gitconfig.in +++ b/gitconfig.in @@ -173,6 +173,11 @@ [merge] tool = vimdiff +[push] + # When running git push without a refspec push only the current + # branch, see man page git-config(1) for details. + default = simple + [format] # When using git format-patch use threads and add all patches as # replies to the first one. diff --git a/setup.sh b/setup.sh index ff01b10..bab4ce2 100755 --- a/setup.sh +++ b/setup.sh @@ -27,6 +27,11 @@ if installed git; then generate gitconfig .in simple_cpp \ PWD -- "`pwd`" + # Older Git versions don't support push.default = simple. + if ! git status >/dev/null 2>&1; then + echo 'gitconfig: removing push.default = simple' + grep_i -v '^[[:space:]]default = simple$' gitconfig + fi # Older Git versions don't support --patience. if ! git diff --patience >/dev/null 2>&1; then sed_i 's/--patience//' gitconfig