git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Tabs in commit messages - de-tabify option in strbuf_stripspace()?
@ 2016-03-16  0:16 Linus Torvalds
  2016-03-16  0:23 ` Stefan Beller
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Linus Torvalds @ 2016-03-16  0:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

So I end up doing this manually when I notice, but I was wondering ig
maybe git could just have an option to "git am" and friends to
de-tabify the commit message.

It's particularly noticeable when people line things up using tabs
(for the kernel, it's often things like "cpu1 does X, cpu2 does Y"),
and then when you do "git log" it looks like a unholy mess, because
the 4-char indentation of the log message ends up causing those things
to not line up at all after all.

The natural thing to do would be to pass in a "tab size" parameter to
strbuf_stripspace(), and default it to 0 (for no change), but have
some way to let people say "expand tabs to spaces at 8-character
tab-stops" or similar (but let people use different tab-stops if they
want).

Do people hate that idea? I may not get around to it for a while (it's
the kernel merge window right now), but I can write the patch
eventually - I just wanted to do an RFC first.

                Linus

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2016-03-20 13:30 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16  0:16 Tabs in commit messages - de-tabify option in strbuf_stripspace()? Linus Torvalds
2016-03-16  0:23 ` Stefan Beller
2016-03-16  0:45   ` Linus Torvalds
2016-03-16  0:34 ` Randall S. Becker
2016-03-16  0:45 ` Junio C Hamano
2016-03-16  0:48   ` Linus Torvalds
2016-03-16  1:00     ` Stefan Beller
2016-03-16  1:02       ` Stefan Beller
2016-03-16 14:27         ` Marc Branchaud
2016-03-16 14:50           ` Duy Nguyen
2016-03-16 16:15           ` Linus Torvalds
2016-03-16 16:47             ` Junio C Hamano
2016-03-20 13:29           ` Matthieu Moy
2016-03-16  4:05     ` Linus Torvalds
2016-03-16  4:46       ` Junio C Hamano
2016-03-16  4:57         ` Linus Torvalds
2016-03-16  5:17           ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).