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

Re: [PATCH v2] commit, status: #comment diff output in verbose mode

From
Jeff King <peff@peff.net>
Date
Mar 11, 2011, 01:23 UTC
Message-ID
<20110311012318.GB15377@sigill.intra.peff.net>
In-Reply-To
<7vvczq1o4l.fsf@alter.siamese.dyndns.org>
On Thu, Mar 10, 2011 at 04:45:14PM -0800, Junio C Hamano wrote:
Show 12 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > One reason to keep the existing behavior is that editors will tend to
> > syntax-highlight the diff portion without much extra effort (in vim, at
> > least, the syntax highlighting just includes the diff syntax
> > highlighting for that section).
> 
> Hmm, thanks for pointing it out; it indeed is a valid concern.
> 
> Although I usually strongly resist changes in order to keep the user
> experience stable, I didn't think about this one, as I don't let the
> editor syntax highlight anything.
I like the proposal for:
  # Lines below this one will be removed.
  diff --git ...

which seems to have the best of both worlds, robust and easy for editors to recognize as a diff. For that matter, we could also do "# Lines below this one..." for _all_ of the git-status template, but I don't think it's necessary. Those lines are already clearly marked with a delimiter, and I don't think anybody is complaining about them (and the "Lines below this one..." line adds just one more line of cruft).

-Peff
Previous: Junio C HamanoNext: Jeff King
Message 5 of 11 in “commit, status: #comment diff output in verbose mode”
  1. commit, status: #comment diff output in verbose modeIan Ward Comfort, Mar 10, 2011
  2. Jeff KingMar 10, 2011
  3. SZEDER GáborMar 10, 2011
  4. Junio C HamanoMar 11, 2011
  5. Jeff KingMar 11, 2011
  6. Jeff KingMar 11, 2011
  7. Michael J GruberMar 11, 2011
  8. Jeff KingMar 17, 2011
  9. Michael J GruberMar 17, 2011
  10. Jeff KingMar 17, 2011
  11. Piotr KrukowieckiMar 13, 2011

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.