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

Re: Tabs in commit messages - de-tabify option in strbuf_stripspace()?

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 16, 2016, 16:47 UTC
Message-ID
<xmqqfuvq5pz7.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CA+55aFwFsBKZZeqhBDf_YXG6vrSrvfFVCsRc0mkFUiDS9Rd+QA@mail.gmail.com>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 14 quoted lines
> On Wed, Mar 16, 2016 at 7:27 AM, Marc Branchaud <marcnarc@xiplink.com> wrote:
>>
>> Could this also help with diff output, where the leading + or - mars the
>> indentation in a similar way?
>
> I don't think that's a good idea at least by default, since then it
> will break things like running diff in emacs capture mode.
>
> So even if you're in a terminal, you can't assume that you can munge
> the output too much.
>
> Of course, if colorization is on, you might as well pretty-print the
> diff by indenting things properly too, since the end result isn't
> going to be used as a _diff_.

I agree that I will never use such an end result as a diff, but I may still be tempted to cut-and-paste individual lines after '^+' when resurrecting a WIP topic that does not rebase very well, so I agree with you that the output shouldn't be munged by default even though I think it is OK to have an option..

Previous: Linus TorvaldsNext: Matthieu Moy
Message 12 of 17 in “Tabs in commit messages - de-tabify option in strbuf_stripspace()?”
  1. Linus TorvaldsMar 16, 2016
  2. Stefan BellerMar 16, 2016
  3. Linus TorvaldsMar 16, 2016
  4. Randall S. BeckerMar 16, 2016
  5. Junio C HamanoMar 16, 2016
  6. Linus TorvaldsMar 16, 2016
  7. Stefan BellerMar 16, 2016
  8. Stefan BellerMar 16, 2016
  9. Marc BranchaudMar 16, 2016
  10. Duy NguyenMar 16, 2016
  11. Linus TorvaldsMar 16, 2016
  12. Junio C HamanoMar 16, 2016
  13. Matthieu MoyMar 20, 2016
  14. Linus TorvaldsMar 16, 2016
  15. Junio C HamanoMar 16, 2016
  16. Linus TorvaldsMar 16, 2016
  17. Jeff KingMar 16, 2016

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.