Do not fork PAGER=cat
Unless the user has a nonstandard "cat" command that does not meow like a cat, this should not break anything and would save an extra pipe. Signed-off-by: Junio C Hamano <junkio@cox.net>
Junio C Hamano committed
Apr 16, 2006 at 01:46 UTC
caef71a5354ca162cc5a6914a7a643efbc9ae28a
1 file changed
+1
-1
pager.c
+1
-1
@@ -20,7 +20,7 @@ void setup_pager(void)
20
return;
21
if (!pager)
22
pager = "less";
23
- else if (!*pager)
23
+ else if (!*pager || !strcmp(pager, "cat"))
24
return;
25
26
if (pipe(fd) < 0)