Re: On Tabs and Spaces
From: <hidden>
Date: 2016-06-15 22:43:42
On Wed, 17 Oct 2007, Jeff King wrote:
On Wed, Oct 17, 2007 at 05:59:27PM -0700, Linus Torvalds wrote:quoted
It happens. We do de-spacification in the kernel occasionally when it is an annoyance. Usually it shows up in patches, though - exactly because code which adds spaces instead of tabs won't line up correctly in the diff.You have made this claim several times, and I really don't understand it. If I have 8 spaces, then a diff line will have either " ", "+", or "-" followed by 8 spaces. If I use a hard tab, then the tab will end up only taking up 7 spaces because of the nature of tabs. This might matter if I'm comparing non-diff code to diff code. But in a diff, _everything_ is indented by exactly one space, so it all lines up. Is there something I'm missing?
if the code uses a tab and the patch uses 8 spaces the two will not line up in the diff becouse in the diff output the tab is 'only 7 spaces; useing one or the other isn't the problem, it's the mixing of the two. David Lang