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

Re: To page or not to page

From
Junio C Hamano <junio@pobox.com>
Date
May 11, 2008, 17:15 UTC
Message-ID
<7vhcd469tw.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080506055128.GA26311@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 23 quoted lines
> So how about this:
>
>  - keep a global use_pager = { 0 (explicit no), 1 (explicit yes), -1
>    (unknown) }
>
>  - if git-foo, lookup config for pager.foo
>
>  - otherwise we have "git [options] foo"; look for -p / --no-pager; if
>    none found, then lookup config for "foo"
>
>  - before proceeding further, "commit" the pager choice by running it
>    (if 1), munging GIT_PAGER=cat (if 0), or doing nothing (if -1)
>
>  - before handling an internal command, if use_pager is -1 and the
>    command defaults to a pager, we run it then
>
> The patch below implements this.
>
> It would be nice to actually defer running the pager until we are about
> to run a git command. I.e., never "commit" to the pager until we are
> actually running an internal command or exec'ing an external command.
> That way it would be safe to make an alias that called "--no-pager"
> (which is currently disallowed).

Ok, I agree that this is a less nice (as you mention ablve) but a workable compromise with the reality.

Previous: Jeff KingNext: Jeff King
Message 25 of 31 in “To page or not to page”
  1. Kevin BallardMay 2, 2008
  2. Jeff KingMay 2, 2008
  3. Junio C HamanoMay 2, 2008
  4. Kevin BallardMay 2, 2008
  5. Junio C HamanoMay 2, 2008
  6. Bart TrojanowskiMay 2, 2008
  7. Pedro MeloMay 2, 2008
  8. Kevin BallardMay 2, 2008
  9. Wincent ColaiutaMay 2, 2008
  10. Jeff KingMay 2, 2008
  11. Pedro MeloMay 2, 2008
  12. Aidan Van DykMay 2, 2008
  13. Wincent ColaiutaMay 2, 2008
  14. Kevin BallardMay 2, 2008
  15. Wincent ColaiutaMay 2, 2008
  16. Jeff KingMay 2, 2008
  17. Johannes SchindelinMay 2, 2008
  18. Jeff KingMay 2, 2008
  19. Junio C HamanoMay 2, 2008
  20. Jeff KingMay 2, 2008
  21. Junio C HamanoMay 2, 2008
  22. Jeff KingMay 5, 2008
  23. Jeff KingMay 6, 2008
  24. Jeff KingMay 6, 2008
  25. Junio C HamanoMay 11, 2008
  26. Jeff KingMay 16, 2008
  27. Jeff KingMay 16, 2008
  28. Johannes SchindelinMay 16, 2008
  29. Jakub NarebskiMay 2, 2008
  30. Jeff KingMay 2, 2008
  31. Jeff KingMay 2, 2008

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.