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

Re: [PATCH 1/4] diff-highlight: add `less -r` to cmd in README

From
Jeff King <peff@peff.net>
Date
Nov 3, 2015, 21:55 UTC
Message-ID
<20151103215535.GA24971@sigill.intra.peff.net>
In-Reply-To
<xmqqwptybvk5.fsf@gitster.mtv.corp.google.com>
On Tue, Nov 03, 2015 at 01:51:54PM -0800, Junio C Hamano wrote:
Show 11 quoted lines
> Jeff King <peff@peff.net> writes:
> 
> > I agree with Junio that "-R" is a more sensible default, but I don't
> > think that should be necessary. We already set LESS when running the
> > pager (and if you are overriding it, you are already in trouble, because
> > git itself will generate ANSI codes by default).
> 
> I do not quite understand this part.  Inside git itself when we
> spawn the pager we export LESS with a sensible default, exactly to
> help users who do not have LESS set and exported.  This one however
> is not spawned by git but the end-user piping output of diff-hilite.

Oh, you're right. I mistook it as instructions for what to put in pager.log, but that is clearly not what this is. I agree that telling the user to use "-R" here is a good idea.

And indeed, the instructions just below the hunk in question describe setting it properly in your config (with less, and no "-R"). So I was simply confused and not reading carefully enough.

-Peff
Previous: Junio C HamanoNext: Jonathan Lebon
Message 7 of 17 in “diff-highlight: make a few improvements”
  1. 0/4 diff-highlight: make a few improvementsJonathan Lebon, Nov 3, 2015
  2. 1/4 diff-highlight: add `less -r` to cmd in READMEJonathan Lebon, Nov 3, 2015
  3. Junio C HamanoNov 3, 2015
  4. Jonathan LebonNov 3, 2015
  5. Jeff KingNov 3, 2015
  6. Junio C HamanoNov 3, 2015
  7. Jeff KingNov 3, 2015
  8. 2/4 diff-highlight: factor out prefix/suffix functionsJonathan Lebon, Nov 3, 2015
  9. Jeff KingNov 3, 2015
  10. 3/4 diff-highlight: match up lines before highlightingJonathan Lebon, Nov 3, 2015
  11. Jeff KingNov 3, 2015
  12. Jeff KingNov 3, 2015
  13. Jonathan LebonNov 17, 2015
  14. Jeff KingNov 17, 2015
  15. 4/4 diff-highlight: add maxhunksize config optionJonathan Lebon, Nov 3, 2015
  16. Jeff KingNov 3, 2015
  17. Jeff KingNov 3, 2015

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.