From c62ff1628bc3bb08aebb77d97dac026c8f17cf4f Mon Sep 17 00:00:00 2001 From: Luveen Rupchand Wadhwani Date: Tue, 4 Mar 2014 23:22:29 -0800 Subject: .gitconfig: Explicitly disable `indent-with-non-tab` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .gitconfig | 5 ++--- 1 file 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: trustctime = false -- cgit v1.2.3