git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: On Tabs and Spaces

From
CWChrister Weinigel <christer@weinigel.se>
Date
Oct 17, 2007, 23:17 UTC
Message-ID
<20071018011734.7b636141@localhost.localdomain>
In-Reply-To
<Pine.LNX.4.64.0710172310270.25221@racer.site>

On Wed, 17 Oct 2007 23:11:37 +0100 (BST) Johannes Schindelin <Johannes.w@gmx.de> wrote:

Show 11 quoted lines
> Hi,
> 
> On Wed, 17 Oct 2007, Christer Weinigel wrote:
> 
> > I think you would get at lot less argument if you weren't so damn
> > self righteous about it.
> 
> Why is it that in this thread, people whom I have heard _nothing_ of 
> before seem to think this would be a good time to let their opinion
> be heard?  Now, _that_ is what I call righteous.  Show nothing but
> opinion.
I'm not that invisible am I?
    cd linux-2.6.22.7
    find . -type f | xargs egrep -il "weinigel" | wc -l
    17

Ahh, confirmation, I really do exist. The earliest LSM entry I can find for myself is from 1995:

http://www.ibiblio.org/pub/linux/kernel/patches/scanners/hpscan-0.1.1.5.lsm
Mmm, nostalgia. :-)

But yes, I haven't contributed anything to git so far, I mostly lurk on the mailing list and try to keep up with what's happening to git. In the beginning I sent a few ideas to the list (which quite sadly were ignored), but unfortunately I've been busy with paying work to do much with git after that. And at work we use Perforce (yuk) or Subversion (a lot nicer than Perforce) and privately I use CVS just because I started using CVS ten years ago and haven't bothered to change. And when I'm free I prefer to hack on hardware or device drivers instead.

The reason I wrote my first mail in this thread is that I work in a different environment than Linus does and wanted to share that experience. I usually work with embedded programming, where people use lots of different editors and in mixed environments. Some people use Visual Studio on Windows because that's what they use for host programming, a lot of embedded development is done in the (almost invariably sucky) IDE that comes with the compilers for the embedded CPU, such as Microchips MPLAB or IAR Workbench, Eclipse is becoming quite popular for C development, Slickedit is also popular on Windows, a colleague prefers nedit for some strange reason, and so on. In such a heterogeneous environment the easiest way to make sure that people see the same indentation in all editors is to just tell them to use spaces for indentation, and I think that every editor I just mentioned has a setting to do that automatically. Microemacs is the odd one out in that it doesn't support it. And my employers haven't really been paying me to go on a crusade for the holy TAB is 8 spaces cause, they just want things done, so I've had to settle for a "good enough" solution which works most of the time.

So I just thought it was unfair of Linus to say that "use spaces" doesn't solve any problems, in some environments it does. For the Linux kernel and Git, it's easier for the maintainer to enforce the coding standards and since Linus and Junio prefer to use hard tabs, that are the rules that people who want to play with their toys have to adhere to.

BTW, how serious is the problem with deltifying when there are a lot of spaces that David Kastrup mentioned? It does sound like a quite serious problem if it has a big impact on the performance of Git. Git isn't only used for the Linux kernel, so there has to be some projects that both use spaces for indentation and use Git out there. Wouldn't it be a problem when people put ASCII graphics in comments or just have comments like /*********************************/ in their code?

  /Christer
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 55 of 100 in “On Tabs and Spaces”
  1. Michael WittenOct 16, 2007
  2. Shawn O. PearceOct 16, 2007
  3. Michael WittenOct 16, 2007
  4. Andreas EricssonOct 16, 2007
  5. Sam RavnborgOct 16, 2007
  6. Petr BaudisOct 16, 2007
  7. DavidOct 17, 2007
  8. Andy ParkinsOct 17, 2007
  9. Adam PiatyszekOct 16, 2007
  10. Lars HjemliOct 16, 2007
  11. Adam PiatyszekOct 16, 2007
  12. Jeffrey C. OllieOct 16, 2007
  13. Michael WittenOct 16, 2007
  14. Jari AaltoOct 16, 2007
  15. Linus TorvaldsOct 16, 2007
  16. Mike HommeyOct 16, 2007
  17. Linus TorvaldsOct 16, 2007
  18. Linus TorvaldsOct 16, 2007
  19. Matthieu MoyOct 16, 2007
  20. Tom TobinOct 16, 2007
  21. Linus TorvaldsOct 16, 2007
  22. Christer WeinigelOct 16, 2007
  23. Linus TorvaldsOct 17, 2007
  24. Michael WittenOct 17, 2007
  25. Linus TorvaldsOct 17, 2007
  26. Luke LuOct 17, 2007
  27. Michael WittenOct 17, 2007
  28. Luke LuOct 17, 2007
  29. Nikolai WeibullOct 17, 2007
  30. Michael WittenOct 17, 2007
  31. Jari AaltoOct 17, 2007
  32. Andreas EricssonOct 17, 2007
  33. Jari AaltoOct 17, 2007
  34. Dmitry TorokhovOct 18, 2007
  35. Jari AaltoOct 18, 2007
  36. Petr BaudisOct 18, 2007
  37. Nikolai WeibullOct 18, 2007
  38. Miles BaderOct 22, 2007
  39. David KågedalOct 18, 2007
  40. Mike HommeyOct 18, 2007
  41. Jari AaltoOct 18, 2007
  42. Linus TorvaldsOct 17, 2007
  43. Johannes SchindelinOct 17, 2007
  44. Tom TobinOct 17, 2007
  45. Linus TorvaldsOct 17, 2007
  46. Tom TobinOct 17, 2007
  47. Linus TorvaldsOct 17, 2007
  48. Nicolas PitreOct 17, 2007
  49. Josh EnglandOct 17, 2007
  50. Linus TorvaldsOct 17, 2007
  51. Christer WeinigelOct 17, 2007
  52. Linus TorvaldsOct 17, 2007
  53. David KastrupOct 18, 2007
  54. Johannes SchindelinOct 17, 2007
  55. Christer WeinigelOct 17, 2007
  56. Johannes SchindelinOct 17, 2007
  57. Christer WeinigelOct 18, 2007
  58. Andreas EricssonOct 18, 2007
  59. David KågedalOct 18, 2007
  60. Linus TorvaldsOct 17, 2007
  61. David KastrupOct 17, 2007
  62. Johannes SchindelinOct 17, 2007
  63. Jan WielemakerOct 17, 2007
  64. Jeff KingOct 18, 2007
  65. Linus TorvaldsOct 18, 2007
  66. Jeff KingOct 18, 2007
  67. david@lang.hmOct 18, 2007
  68. Jeff KingOct 18, 2007
  69. Linus TorvaldsOct 18, 2007
  70. Linus TorvaldsOct 18, 2007
  71. Linus TorvaldsOct 18, 2007
  72. Jeff KingOct 18, 2007
  73. Add a message explaining that automatic GC is about to startkoreth@midwinter.com, Oct 18, 2007
  74. Steven GrimmOct 18, 2007
  75. Jeff KingOct 18, 2007
  76. Shawn O. PearceOct 18, 2007
  77. Brian GernhardtOct 18, 2007
  78. Steven GrimmOct 18, 2007
  79. Jeff KingOct 18, 2007
  80. Shawn O. PearceOct 19, 2007
  81. git-gc: improve wording of --auto notificationJeff King, Oct 19, 2007
  82. Shawn O. PearceOct 19, 2007
  83. Jeff KingOct 19, 2007
  84. Nicolas PitreOct 18, 2007
  85. Nicolas PitreOct 18, 2007
  86. Jeff KingOct 18, 2007
  87. Jeff KingOct 18, 2007
  88. David KastrupOct 17, 2007
  89. Nicolas PitreOct 17, 2007
  90. David KastrupOct 17, 2007
  91. SeanOct 17, 2007
  92. David KastrupOct 17, 2007
  93. Sam RavnborgOct 16, 2007
  94. Paul WankadiaOct 18, 2007
  95. Linus TorvaldsOct 18, 2007
  96. Dmitry PotapovOct 18, 2007
  97. Andreas EricssonOct 16, 2007
  98. Jan-Benedict GlawOct 16, 2007
  99. Andreas EricssonOct 16, 2007
  100. Robin RosenbergOct 20, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.