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

Re: [PATCH/RFC] Fix for default pager

From
BCBrandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
Date
Jun 15, 2010, 16:11 UTC
Message-ID
<gJV0lM_e77LzoiHR7moWdAApSZ7yI38lZ-w8kZwc97unWqtBc94nfg@cipher.nrlssc.navy.mil>
In-Reply-To
<20100610085952.GA8269@coredump.intra.peff.net>
On 06/10/2010 03:59 AM, Jeff King wrote:
Show 6 quoted lines
> On Thu, Jun 10, 2010 at 10:48:31AM +0200, Tor Arntsen wrote:
> 
>> That looks good to me.
> 
> OK, here it is with a commit message. Other systems might want the same,
> I guess (Solaris, IRIX?). I'm cc'ing Brandon, who might have some input.

Yes, I currently set DEFAULT_PAGER to 'more' in my config.mak file on both of these platforms. The 'more' on IRIX is decent (it can go backwards), but the 'more' on Solaris sucks. I've seen 'less' on some newer versions of Solaris. Is it a standard component yet?

So, I think it's appropriate to set DEFAULT_PAGER on IRIX. There can't be many users anyway. It's probably appropriate to set it on Solaris too, if 'less' is not a commonly installed component on modern systems. I wonder how surprised existing git users will be, for those on Solaris platforms that have 'less' installed, when Solaris's crappy 'more' becomes their pager.

Actually, there is a 'more' in /usr/xpg4/bin that is much better, but it is not being used when DEFAULT_PAGER is set to 'more'. Junio created the SANE_TOOL_PATH hack to add this additional path to the search path, but it is only implemented in git-sh-setup, so it only has effect for git scripts. Maybe it should be added to setup_path().

But, I also think it would be nice if git fell back to the 'cat' behavior when it fails to spawn the pager, because the following error is not very informative:

   casey@<a_solaris_box> # git log
   sh: less: not found
   Broken Pipe
-brandon
Show 28 quoted lines
> Note that this is completely untested by me, as all of my AIX boxen have
> gone away in the past few months (yay!).
> 
> -- >8 --
> Subject: [PATCH] Makefile: default pager on AIX to "more"
> 
> AIX doesn't ship with "less" by default, and their "more" is
> more featureful than average, so the latter is a more
> sensible choice.  People who really want less can set the
> compile-time option themselves, or users can set $PAGER.
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>  Makefile |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 34b7dd5..6ad0aca 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -930,6 +930,7 @@ ifeq ($(uname_S),NetBSD)
>  	HAVE_PATHS_H = YesPlease
>  endif
>  ifeq ($(uname_S),AIX)
> +	DEFAULT_PAGER = more
>  	NO_STRCASESTR=YesPlease
>  	NO_MEMMEM = YesPlease
>  	NO_MKDTEMP = YesPlease
Previous: Junio C HamanoNext: Tor Arntsen
Message 21 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.