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

Re: git-log produces no output

From
Linus Torvalds <torvalds@osdl.org>
Date
Apr 21, 2006, 19:18 UTC
Message-ID
<Pine.LNX.4.64.0604211214560.3701@g5.osdl.org>
In-Reply-To
<20060421184815.22939.qmail@web60319.mail.yahoo.com>
On Fri, 21 Apr 2006, Bob Portmann wrote:
Show 5 quoted lines
> 
> Yes, this is the problem.  It works when I send it to a file.  It seems
> to be that having any extra options my PAGER command that messes it up
> (see below).  If get-log was a shell script I would imagine that some
> quotes are missing:-)
It's the other way around: it's got "too much" quoting.

"git log" will literally _execute_ the PAGER environment, not pass it to a shell, and not interpret any arguments.

So it will look for a program called "more -i" (space and all), and no such program exists, so the execve fails, and git log ends up being silent.

This patch would have made things a lot more obvious.
Junio?
		Linus
---
diff --git a/pager.c b/pager.c
index b063353..9204641 100644
--- a/pager.c
+++ b/pager.c
@@ -47,5 +47,6 @@ void setup_pager(void)
 
 	setenv("LESS", "-S", 0);
 	run_pager(pager);
+	die("unable to execute pager '%s'", pager);
 	exit(255);
 }
Previous: Bob PortmannNext: Linus Torvalds
Message 6 of 10 in “git-log produces no output”
  1. Bob PortmannApr 21, 2006
  2. Linus TorvaldsApr 21, 2006
  3. Bob PortmannApr 21, 2006
  4. Paolo CiarrocchiApr 21, 2006
  5. Bob PortmannApr 21, 2006
  6. Linus TorvaldsApr 21, 2006
  7. Linus TorvaldsApr 21, 2006
  8. Bob PortmannApr 21, 2006
  9. Junio C HamanoApr 21, 2006
  10. Linus TorvaldsApr 21, 2006

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.