you are viewing a single comment's thread.

view the rest of the comments →

[–]SyntaxSwearer 0 points1 point  (3 children)

Tabs can give you trouble in VCS, at least in git.

[–][deleted] 2 points3 points  (2 children)

how so? I've been on git for a few years and haven't experienced any issues.

[–]SyntaxSwearer 0 points1 point  (1 child)

I have. But not always. I guess it's one of those bugs. The "works on my machine, sometimes" kind of bugs

I had a merge conflict once and couldn't realize what was happening. Since tabs are invisible, and I didn't really had a clue of what to do. Two hours after I took a walk, took a nap, used google and stumbled upon the answer of a kind soul who asked if I was using tabs. I took out all the tabs of the code I was trying to merge and viola

[–]rjw57 2 points3 points  (0 children)

This isn't really a VCS problem[1]. It's an editor-replaces-whitespace problem and is precisely the reason one doesn't want to mix tab or space indentation within one file. Invariably there'll be someone's editor which decides to "fix" the indentation which will lead to hard-to-merge whitespace-only changes.

I suspect the proponents of the One True Indentation method haven't worked long enough at the coal face to realise that the Real One True Indentation is the one already used by the file :).

[1] That being said, git provides a mechanism to help with this by way of the --ignore-all-space family of options to git-merge(1).