]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
gitconfig: Add push.default = simple.
authorSimon Ruderich <simon@ruderich.org>
Thu, 24 Oct 2013 00:06:16 +0000 (02:06 +0200)
committerSimon Ruderich <simon@ruderich.org>
Thu, 24 Oct 2013 00:06:16 +0000 (02:06 +0200)
gitconfig.in
setup.sh

index cf6e169c737b2f5ae126e1f9c0713ce041179849..a04b7574ab23ed255839f6f7f56f7b9b050613d2 100644 (file)
 [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.
index ff01b10bb234e5a2ece104847549010add812f91..bab4ce22762cde37db3623fcb63ce4b9277f1eac 100755 (executable)
--- 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