From 917248b29e9f635f27a533034f655cc110e2cca7 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Thu, 24 Oct 2013 02:06:16 +0200 Subject: [PATCH] gitconfig: Add push.default = simple. --- gitconfig.in | 5 +++++ setup.sh | 5 +++++ 2 files changed, 10 insertions(+) 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 -- 2.45.2