aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuveen Rupchand Wadhwani <luveenw@gmail.com>2014-03-04 23:22:29 -0800
committerMathias Bynens <mathias@qiwi.be>2014-03-05 08:37:45 +0100
commitc62ff1628bc3bb08aebb77d97dac026c8f17cf4f (patch)
tree720f174ea0a7c9940cb7811155cd882d6fe19af6
parentd4cfb804fceb3e6c22ea581b3d89d04522c8e503 (diff)
downloaddotfiles-c62ff1628bc3bb08aebb77d97dac026c8f17cf4f.tar.gz
dotfiles-c62ff1628bc3bb08aebb77d97dac026c8f17cf4f.tar.bz2
dotfiles-c62ff1628bc3bb08aebb77d97dac026c8f17cf4f.zip
.gitconfig: Explicitly disable `indent-with-non-tab`
Don’t use `indent-with-non-tab`. This config flag is PERNICIOUS. If turned on, Git won’t tell you that you indented your code incorrectly. Instead, when it is pushing your changes to your remote repo, Git will silently convert any consecutive 8-space strings it sees into tab characters. This can be highly undesirable, especially if you collaborate with a team that expects the code to be indented using spaces instead of tabs. At the very least, the comment above this line should very clearly explain the fact that `indent-with-non-tab` does more than advertised in the `git-config man page (https://www.kernel.org/pub/software/scm/git/docs/git-config.html). Closes #351.
-rw-r--r--.gitconfig5
1 files changed, 2 insertions, 3 deletions
diff --git a/.gitconfig b/.gitconfig
index 249eead..b14b609 100644
--- a/.gitconfig
+++ b/.gitconfig
@@ -42,12 +42,11 @@
# Use custom `.gitignore` and `.gitattributes`
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
- # Treat spaces before tabs, lines that are indented with 8 or more spaces, and
- # all kinds of trailing whitespace as an error.
+ # Treat spaces before tabs and all kinds of trailing whitespace as an error.
# [default] trailing-space: looks for spaces at the end of a line
# [default] space-before-tab: looks for spaces before tabs at the beginning of
# a line
- whitespace = space-before-tab,indent-with-non-tab,trailing-space
+ whitespace = space-before-tab,-indent-with-non-tab,trailing-space
# Make `git rebase` safer on OS X
# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/>
trustctime = false