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

Re: [PATCH/RFC] Fix for default pager

From
Jeff King <peff@peff.net>
Date
Jun 8, 2010, 05:35 UTC
Message-ID
<20100608053507.GB15156@coredump.intra.peff.net>
In-Reply-To
<AANLkTinydWk3GqGDww8FS7pmW16jAVazRkmT_GsRMIhy@mail.gmail.com>
On Mon, Jun 07, 2010 at 11:14:58PM -0300, Dario Rodriguez wrote:
Show 15 quoted lines
> On Mon, Jun 7, 2010 at 9:04 PM, Ben Walton <bwalton@artsci.utoronto.ca> wrote:
> >
> > Why not set a sensible DEFAULT_PAGER value for the system in your
> > config.mak file instead?
> >
> > Just curious.
> >
> 
> I was thinking about it before coding the patch, and found some
> consequences. First of all, the most important thing I should
> understand is that most users will install git from binary,
> precompiled packages instead of the good download and compile. So this
> is actually a good reason to not do it that way (config.mak)... Some
> users may download the compiled binary while it's actually calling
> it's default pager.

If you are downloading a binary, the package compiler should do one of two things:

  1. indicate a package dependency on 'less'
  2. set DEFAULT_PAGER to 'more' (or whatever is appropriate for your
     system)

Yes, auto-detection means we can more flexibly "upgrade" to less when the package suddenly appears. But if you really care about your pager, why not just set $PAGER?

The most important thing is that users who _don't_ care don't see something broken, but the rules above already cover that with current git.

Show 7 quoted lines
> But this is not the only reason. Let me give you an example: We
> develop (I'm actually working at Accenture) using several machines.
> When we need some tool, we compile it in our first machine, and
> install it for an specific user. In some other environments we cannot
> compile things (testing environments) so we transfer (FTP) those
> binary files. It's just another case, and the default pager could
> cause problems here (in fact, i experienced such problems).

Then set DEFAULT_PAGER to 'more' (or 'cat' for that matter), and use $PAGER on machines that are more capable.

-Peff
Previous: Dario RodriguezNext: Dario Rodriguez
Message 4 of 29 in “Fix for default pager”
  1. Fix for default pagerDario Rodriguez, Jun 7, 2010
  2. Ben WaltonJun 8, 2010
  3. Dario RodriguezJun 8, 2010
  4. Jeff KingJun 8, 2010
  5. Dario RodriguezJun 8, 2010
  6. Johannes SixtJun 8, 2010
  7. Dario RodriguezJun 8, 2010
  8. Johannes SixtJun 8, 2010
  9. Dario RodriguezJun 8, 2010
  10. Johannes SixtJun 8, 2010
  11. Dario RodriguezJun 8, 2010
  12. Andreas EricssonJun 8, 2010
  13. Tor ArntsenJun 9, 2010
  14. Miles BaderJun 9, 2010
  15. Jeff KingJun 10, 2010
  16. Tor ArntsenJun 10, 2010
  17. Jeff KingJun 10, 2010
  18. Tor ArntsenJun 10, 2010
  19. Dario RodriguezJun 10, 2010
  20. Junio C HamanoJun 10, 2010
  21. Brandon CaseyJun 15, 2010
  22. Tor ArntsenJun 15, 2010
  23. Nazri RamliyJun 16, 2010
  24. Jeff KingJun 16, 2010
  25. Ævar Arnfjörð BjarmasonJun 9, 2010
  26. Jeff KingJun 8, 2010
  27. Johannes SixtJun 8, 2010
  28. Dario RodriguezJun 8, 2010
  29. Erik Faye-LundJun 8, 2010

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.