* [RFC] Clean way to disable pager
@ 2007-08-19 17:26 Matthieu Moy
2007-08-19 17:41 ` Matthieu Moy
` (4 more replies)
0 siblings, 5 replies; 15+ messages in thread
From: Matthieu Moy @ 2007-08-19 17:26 UTC (permalink / raw)
To: git
Hi,
The man page for git documents the -p option to _enable_ the paginated
output for git, which isn't very usefull since the commands that might
actually need paging have it enabled by default.
What I can't find is a clean way to _disable_ the pager. A hacky way
is to run "git whatever | cat", or "GIT_PAGER=cat git whatever". From
the code, it seems that git doesn't even launch the pager if it's set
to "cat".
I think that deserves an less-hacky, and documented way. I'd suggest a
--no-pager, or --dont-paginate, that would do the opposite of -p as a
global option for git.
Below is a patch that does this:
>From 2148c2564ca6480feaec9a9d091259032257918d Mon Sep 17 00:00:00 2001
From: Matthieu Moy <Matthieu.Moy@imag.fr>
Date: Sun, 19 Aug 2007 19:24:36 +0200
Subject: [PATCH] Add and document a global --no-pager option for git.
To keep the change small, this is done by setting GIT_PAGER to "cat". I'd
prefer not using global/environment variables for that, but it would
require a complete refactoring of options handling in git.
---
Documentation/git.txt | 6 +++++-
git.c | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 8017997..707a756 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -9,7 +9,8 @@ git - the stupid content tracker
SYNOPSIS
--------
[verse]
-'git' [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate]
+'git' [--version] [--exec-path[=GIT_EXEC_PATH]]
+ [-p|--paginate] [--no-pager]
[--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
[--help] COMMAND [ARGS]
@@ -103,6 +104,9 @@ OPTIONS
-p|--paginate::
Pipe all output into 'less' (or if set, $PAGER).
+--no-pager::
+ Do not pipe git output into a pager.
+
--git-dir=<path>::
Set the path to the repository. This can also be controlled by
setting the GIT_DIR environment variable.
diff --git a/git.c b/git.c
index cab0e72..f280e7d 100644
--- a/git.c
+++ b/git.c
@@ -4,7 +4,7 @@
#include "quote.h"
const char git_usage_string[] =
- "git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate] [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS]";
+ "git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate] [--no-pager] [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND
[ARGS]";
static void prepend_to_path(const char *dir, int len)
{
@@ -58,6 +58,10 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
}
} else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
setup_pager();
+ } else if (!strcmp(cmd, "--no-pager")) {
+ setenv("GIT_PAGER", "cat", 1);
+ if (envchanged)
+ *envchanged = 1;
} else if (!strcmp(cmd, "--git-dir")) {
if (*argc < 2) {
fprintf(stderr, "No directory given for --git-dir.\n" );
--
1.5.3.rc0.64.gf4f4a-dirty
--
Matthieu
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [RFC] Clean way to disable pager
2007-08-19 17:26 [RFC] Clean way to disable pager Matthieu Moy
@ 2007-08-19 17:41 ` Matthieu Moy
2007-08-19 17:52 ` Linus Torvalds
` (3 subsequent siblings)
4 siblings, 0 replies; 15+ messages in thread
From: Matthieu Moy @ 2007-08-19 17:41 UTC (permalink / raw)
To: git
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> What I can't find is a clean way to _disable_ the pager. A hacky way
> is to run "git whatever | cat", or "GIT_PAGER=cat git whatever".
I juste realized that the second way is actually documented:
'GIT_PAGER'::
This environment variable overrides `$PAGER`. If it is set
to an empty string or to the value "cat", git will not launch
a pager.
Still, I find this a bit too hidden in the documentation. I'd expect
to find the way to disable the pager close to the place where I find
the way to enable it. Perhaps something like this would do:
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -101,7 +101,8 @@ OPTIONS
the current setting and then exit.
-p|--paginate::
- Pipe all output into 'less' (or if set, $PAGER).
+ Pipe all output into 'less' (or if set, $GIT_PAGER or $PAGER).
+ See the documentation of GIT_PAGER below to disable the pager.
--git-dir=<path>::
Set the path to the repository. This can also be controlled by
Or perhaps move the sentence about "cat" from the documentation of
GIT_PAGER to the one of --paginate (neither place is really
appropriate, it's not specific to GIT_PAGER since setting $PAGER works
also, and not specific to --paginate since many commands enable it
automatically).
--
Matthieu
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC] Clean way to disable pager
2007-08-19 17:26 [RFC] Clean way to disable pager Matthieu Moy
2007-08-19 17:41 ` Matthieu Moy
@ 2007-08-19 17:52 ` Linus Torvalds
2007-08-19 18:24 ` Brian Gernhardt
` (2 subsequent siblings)
4 siblings, 0 replies; 15+ messages in thread
From: Linus Torvalds @ 2007-08-19 17:52 UTC (permalink / raw)
To: Matthieu Moy; +Cc: git
On Sun, 19 Aug 2007, Matthieu Moy wrote:
>
> I think that deserves an less-hacky, and documented way. I'd suggest a
> --no-pager, or --dont-paginate, that would do the opposite of -p as a
> global option for git.
Ack. I think it makes sense. The GIT_PAGER thing is equivalent, but at the
same time, having a way to explicitly disable it with a command line
option just seems to be the RightThing(tm) to do.
Linus
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC] Clean way to disable pager
2007-08-19 17:26 [RFC] Clean way to disable pager Matthieu Moy
2007-08-19 17:41 ` Matthieu Moy
2007-08-19 17:52 ` Linus Torvalds
@ 2007-08-19 18:24 ` Brian Gernhardt
2007-08-19 18:52 ` Junio C Hamano
2007-08-19 21:28 ` [RFC] Clean way to disable pager Alex Riesen
4 siblings, 0 replies; 15+ messages in thread
From: Brian Gernhardt @ 2007-08-19 18:24 UTC (permalink / raw)
To: Matthieu Moy; +Cc: git
On Aug 19, 2007, at 1:26 PM, Matthieu Moy wrote:
> I think that deserves an less-hacky, and documented way. I'd suggest a
> --no-pager, or --dont-paginate, that would do the opposite of -p as a
> global option for git.
ACK. I was going to write this pretty soon myself.
~~ Brian
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC] Clean way to disable pager
2007-08-19 17:26 [RFC] Clean way to disable pager Matthieu Moy
` (2 preceding siblings ...)
2007-08-19 18:24 ` Brian Gernhardt
@ 2007-08-19 18:52 ` Junio C Hamano
2007-08-19 19:44 ` Matthieu Moy
2007-08-19 21:28 ` [RFC] Clean way to disable pager Alex Riesen
4 siblings, 1 reply; 15+ messages in thread
From: Junio C Hamano @ 2007-08-19 18:52 UTC (permalink / raw)
To: Matthieu Moy; +Cc: git
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> I think that deserves an less-hacky, and documented way. I'd suggest a
> --no-pager, or --dont-paginate, that would do the opposite of -p as a
> global option for git.
I think that is a good thing to do.
> From 2148c2564ca6480feaec9a9d091259032257918d Mon Sep 17 00:00:00 2001
> From: Matthieu Moy <Matthieu.Moy@imag.fr>
> Date: Sun, 19 Aug 2007 19:24:36 +0200
> Subject: [PATCH] Add and document a global --no-pager option for git.
>
> To keep the change small, this is done by setting GIT_PAGER to "cat". I'd
> prefer not using global/environment variables for that, but it would
> require a complete refactoring of options handling in git.
And I do not necessarily think this GIT_PAGER thing is a bad way
to do so either. It may end up spawning other commands (perhaps
via alias) and the use of environment is probably the way with
the least impact and complexity.
Please resend an applyable patch with a sign-off (and acked-by
as you have seen).
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC] Clean way to disable pager
2007-08-19 18:52 ` Junio C Hamano
@ 2007-08-19 19:44 ` Matthieu Moy
2007-08-19 21:59 ` Adam Roben
0 siblings, 1 reply; 15+ messages in thread
From: Matthieu Moy @ 2007-08-19 19:44 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
Junio C Hamano <gitster@pobox.com> writes:
> Please resend an applyable patch with a sign-off (and acked-by
> as you have seen).
>From 2c79b9a1b446ca9fa9d72fc595120da34fd403dd Mon Sep 17 00:00:00 2001
From: Matthieu Moy <Matthieu.Moy@imag.fr>
Date: Sun, 19 Aug 2007 19:24:36 +0200
Subject: [PATCH] Add and document a global --no-pager option for git.
To keep the change small, this is done by setting GIT_PAGER to "cat".
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
Documentation/git.txt | 6 +++++-
git.c | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 8017997..707a756 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -9,7 +9,8 @@ git - the stupid content tracker
SYNOPSIS
--------
[verse]
-'git' [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate]
+'git' [--version] [--exec-path[=GIT_EXEC_PATH]]
+ [-p|--paginate] [--no-pager]
[--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
[--help] COMMAND [ARGS]
@@ -103,6 +104,9 @@ OPTIONS
-p|--paginate::
Pipe all output into 'less' (or if set, $PAGER).
+--no-pager::
+ Do not pipe git output into a pager.
+
--git-dir=<path>::
Set the path to the repository. This can also be controlled by
setting the GIT_DIR environment variable.
diff --git a/git.c b/git.c
index cab0e72..f280e7d 100644
--- a/git.c
+++ b/git.c
@@ -4,7 +4,7 @@
#include "quote.h"
const char git_usage_string[] =
- "git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate] [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS]";
+ "git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate] [--no-pager] [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND
[ARGS]";
static void prepend_to_path(const char *dir, int len)
{
@@ -58,6 +58,10 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
}
} else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
setup_pager();
+ } else if (!strcmp(cmd, "--no-pager")) {
+ setenv("GIT_PAGER", "cat", 1);
+ if (envchanged)
+ *envchanged = 1;
} else if (!strcmp(cmd, "--git-dir")) {
if (*argc < 2) {
fprintf(stderr, "No directory given for --git-dir.\n" );
--
1.5.3.rc0.64.gf4f4a-dirty
--
Matthieu
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [RFC] Clean way to disable pager
2007-08-19 17:26 [RFC] Clean way to disable pager Matthieu Moy
` (3 preceding siblings ...)
2007-08-19 18:52 ` Junio C Hamano
@ 2007-08-19 21:28 ` Alex Riesen
4 siblings, 0 replies; 15+ messages in thread
From: Alex Riesen @ 2007-08-19 21:28 UTC (permalink / raw)
To: git
Matthieu Moy, Sun, Aug 19, 2007 19:26:07 +0200:
> I think that deserves an less-hacky, and documented way. I'd suggest a
> --no-pager, or --dont-paginate, that would do the opposite of -p as a
> global option for git.
Ack.
Besides, some platforms having no way to unset an environment
variable, a really cumbersome to work with them (Cygwin/Win32, yes),
so this switch is actually the only way to achive something stable.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC] Clean way to disable pager
2007-08-19 19:44 ` Matthieu Moy
@ 2007-08-19 21:59 ` Adam Roben
2007-08-19 22:37 ` David Kastrup
0 siblings, 1 reply; 15+ messages in thread
From: Adam Roben @ 2007-08-19 21:59 UTC (permalink / raw)
To: Matthieu Moy; +Cc: Junio C Hamano, git
On Aug 19, 2007, at 12:44 PM, Matthieu Moy wrote:
> + [-p|--paginate] [--no-pager]
I think that [-p|--[no-]paginate] would be more consistent with the
way negatable options are normally specified.
-Adam
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC] Clean way to disable pager
2007-08-19 21:59 ` Adam Roben
@ 2007-08-19 22:37 ` David Kastrup
2007-08-20 8:15 ` Matthieu Moy
0 siblings, 1 reply; 15+ messages in thread
From: David Kastrup @ 2007-08-19 22:37 UTC (permalink / raw)
To: Adam Roben; +Cc: Matthieu Moy, Junio C Hamano, git
Adam Roben <aroben@apple.com> writes:
> On Aug 19, 2007, at 12:44 PM, Matthieu Moy wrote:
>
>> + [-p|--paginate] [--no-pager]
>
> I think that [-p|--[no-]paginate] would be more consistent with the
> way negatable options are normally specified.
Disregard previously existing code, I'd vote for using an option set
like the following:
--pager
--pager=less
--pager=cat
--no-pager
"--paginate" is rather artificial in contrast.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC] Clean way to disable pager
2007-08-19 22:37 ` David Kastrup
@ 2007-08-20 8:15 ` Matthieu Moy
2007-08-21 2:11 ` Jakub Narebski
0 siblings, 1 reply; 15+ messages in thread
From: Matthieu Moy @ 2007-08-20 8:15 UTC (permalink / raw)
To: David Kastrup; +Cc: Adam Roben, Junio C Hamano, git
David Kastrup <dak@gnu.org> writes:
> Adam Roben <aroben@apple.com> writes:
>
>> On Aug 19, 2007, at 12:44 PM, Matthieu Moy wrote:
>>
>>> + [-p|--paginate] [--no-pager]
>>
>> I think that [-p|--[no-]paginate] would be more consistent with the
>> way negatable options are normally specified.
>
> Disregard previously existing code, I'd vote for using an option set
> like the following:
>
> --pager
> --pager=less
> --pager=cat
> --no-pager
>
> "--paginate" is rather artificial in contrast.
ACK. I thought of naming the option --no-paginate, but I don't think
that good english. --dont-paginate would be good english, but doesn't
match the --[no-]whatever scheme.
Perhaps using David's proposal, and keeping the --paginate as a
backward compatibility, deprecated switch is the way to go.
--
Matthieu
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [RFC] Clean way to disable pager
2007-08-20 8:15 ` Matthieu Moy
@ 2007-08-21 2:11 ` Jakub Narebski
2007-08-21 8:37 ` [PATCH] Replace git --paginate by git --pager[=PAGER_CMD] Matthieu Moy
0 siblings, 1 reply; 15+ messages in thread
From: Jakub Narebski @ 2007-08-21 2:11 UTC (permalink / raw)
To: git
Matthieu Moy wrote:
> David Kastrup <dak@gnu.org> writes:
>> Adam Roben <aroben@apple.com> writes:
>>> On Aug 19, 2007, at 12:44 PM, Matthieu Moy wrote:
>>>
>>>> + [-p|--paginate] [--no-pager]
>>>
>>> I think that [-p|--[no-]paginate] would be more consistent with the
>>> way negatable options are normally specified.
>>
>> Disregard previously existing code, I'd vote for using an option set
>> like the following:
>>
>> --pager
>> --pager=less
>> --pager=cat
>> --no-pager
>>
>> "--paginate" is rather artificial in contrast.
>
> ACK. I thought of naming the option --no-paginate, but I don't think
> that good english. --dont-paginate would be good english, but doesn't
> match the --[no-]whatever scheme.
>
> Perhaps using David's proposal, and keeping the --paginate as a
> backward compatibility, deprecated switch is the way to go.
I like it too. ACK.
--
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH] Replace git --paginate by git --pager[=PAGER_CMD].
2007-08-21 2:11 ` Jakub Narebski
@ 2007-08-21 8:37 ` Matthieu Moy
2007-08-21 8:42 ` Johannes Schindelin
0 siblings, 1 reply; 15+ messages in thread
From: Matthieu Moy @ 2007-08-21 8:37 UTC (permalink / raw)
To: git; +Cc: Matthieu Moy
The previous one was -p|--paginate, but doesn't accept a natural
negation. This patch changes it to -p|--pager|--pager=PAGER_CMD, which
makes the negation --no-pager more natural, and provides a simple way to
override the pager command (git --pager=CMD is equivalent to
GIT_PAGER=CMD git with most shells).
--paginate is kept as a backward-compatibility, deprecated option.
Suggested-by: David Kastrup <dak@gnu.org>
Idea-acked-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
Documentation/git.txt | 8 +++++---
git.c | 16 ++++++++++++++--
2 files changed, 19 insertions(+), 5 deletions(-)
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 3b0d530..444823d 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -10,7 +10,7 @@ SYNOPSIS
--------
[verse]
'git' [--version] [--exec-path[=GIT_EXEC_PATH]]
- [-p|--paginate|--no-pager]
+ [-p|--pager[=PAGER_CMD]|--no-pager]
[--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE]
[--help] COMMAND [ARGS]
@@ -101,8 +101,10 @@ OPTIONS
environment variable. If no path is given 'git' will print
the current setting and then exit.
--p|--paginate::
- Pipe all output into 'less' (or if set, $PAGER).
+-p|--pager[=PAGER_CMD]::
+ Pipe all output into 'less' (or if set, PAGER_CMD,
+ `$GIT_PAGER`, or `$PAGER`, in this order of preference).
+ --paginate is provided as a deprecated alias for -p.
--no-pager::
Do not pipe git output into a pager.
diff --git a/git.c b/git.c
index c46691e..4c626b5 100644
--- a/git.c
+++ b/git.c
@@ -4,7 +4,9 @@
#include "quote.h"
const char git_usage_string[] =
- "git [--version] [--exec-path[=GIT_EXEC_PATH]] [-p|--paginate|--no-pager] [--bare] [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS]";
+ "git [--version] [--exec-path[=GIT_EXEC_PATH]]\n"
+ " [-p|--pager[=PAGER_CMD]|--no-pager] [--bare]\n"
+ " [--git-dir=GIT_DIR] [--work-tree=GIT_WORK_TREE] [--help] COMMAND [ARGS]";
static void prepend_to_path(const char *dir, int len)
{
@@ -56,8 +58,18 @@ static int handle_options(const char*** argv, int* argc, int* envchanged)
puts(git_exec_path());
exit(0);
}
- } else if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
+ } else if (!strcmp(cmd, "-p") ||
+ /*
+ * Deprecated, but kept for backward
+ * compatibility
+ */
+ !strcmp(cmd, "--paginate")) {
setup_pager();
+ } else if (!prefixcmp(cmd, "--pager")) {
+ cmd += 7;
+ if (*cmd == '=')
+ setenv("GIT_PAGER", cmd+1, 1);
+ setup_pager();
} else if (!strcmp(cmd, "--no-pager")) {
setenv("GIT_PAGER", "cat", 1);
if (envchanged)
--
1.5.3.rc5.17.g1cd0d-dirty
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH] Replace git --paginate by git --pager[=PAGER_CMD].
2007-08-21 8:37 ` [PATCH] Replace git --paginate by git --pager[=PAGER_CMD] Matthieu Moy
@ 2007-08-21 8:42 ` Johannes Schindelin
2007-08-21 8:51 ` Matthieu Moy
0 siblings, 1 reply; 15+ messages in thread
From: Johannes Schindelin @ 2007-08-21 8:42 UTC (permalink / raw)
To: Matthieu Moy; +Cc: git
Hi,
On Tue, 21 Aug 2007, Matthieu Moy wrote:
> The previous one was -p|--paginate, but doesn't accept a natural
> negation. This patch changes it to -p|--pager|--pager=PAGER_CMD, which
> makes the negation --no-pager more natural, and provides a simple way to
> override the pager command (git --pager=CMD is equivalent to
> GIT_PAGER=CMD git with most shells).
>
> --paginate is kept as a backward-compatibility, deprecated option.
Personally, I like to read "git --paginate log" better than to read "git
--pager log". So I would not unnecessarily deprecate --paginate. It's
not like it hurts or something.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Replace git --paginate by git --pager[=PAGER_CMD].
2007-08-21 8:42 ` Johannes Schindelin
@ 2007-08-21 8:51 ` Matthieu Moy
2007-08-21 9:19 ` David Kastrup
0 siblings, 1 reply; 15+ messages in thread
From: Matthieu Moy @ 2007-08-21 8:51 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: git
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Personally, I like to read "git --paginate log" better than to read "git
> --pager log". So I would not unnecessarily deprecate --paginate. It's
> not like it hurts or something.
It doesn't "hurt", but having several options to do the same thing is
useless and confusing (someone reading here about --paginate and there
about --pager may not immediately notice that one is an alias for the
other).
Anyway, how often do you type or read "git --paginate log"?
--
Matthieu
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH] Replace git --paginate by git --pager[=PAGER_CMD].
2007-08-21 8:51 ` Matthieu Moy
@ 2007-08-21 9:19 ` David Kastrup
0 siblings, 0 replies; 15+ messages in thread
From: David Kastrup @ 2007-08-21 9:19 UTC (permalink / raw)
To: git
Matthieu Moy <Matthieu.Moy@imag.fr> writes:
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>
>> Personally, I like to read "git --paginate log" better than to read "git
>> --pager log". So I would not unnecessarily deprecate --paginate. It's
>> not like it hurts or something.
>
> It doesn't "hurt", but having several options to do the same thing is
> useless and confusing (someone reading here about --paginate and there
> about --pager may not immediately notice that one is an alias for the
> other).
>
> Anyway, how often do you type or read "git --paginate log"?
Since it is the default anyway...
Maybe one should have a way to tell git "don't use a pager by default,
but _if_ someone says --pager, _then_ use the following pager".
If one has to set the pager to "cat" to disable paging, using --pager
will not exactly be impressive.
So maybe --no-pager/--pager (or an equivalent config file setting)
should not tamper with the setting of GIT_PAGER, but rather set/reset
an independent flag.
--
David Kastrup
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2007-08-21 9:19 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-19 17:26 [RFC] Clean way to disable pager Matthieu Moy
2007-08-19 17:41 ` Matthieu Moy
2007-08-19 17:52 ` Linus Torvalds
2007-08-19 18:24 ` Brian Gernhardt
2007-08-19 18:52 ` Junio C Hamano
2007-08-19 19:44 ` Matthieu Moy
2007-08-19 21:59 ` Adam Roben
2007-08-19 22:37 ` David Kastrup
2007-08-20 8:15 ` Matthieu Moy
2007-08-21 2:11 ` Jakub Narebski
2007-08-21 8:37 ` [PATCH] Replace git --paginate by git --pager[=PAGER_CMD] Matthieu Moy
2007-08-21 8:42 ` Johannes Schindelin
2007-08-21 8:51 ` Matthieu Moy
2007-08-21 9:19 ` David Kastrup
2007-08-19 21:28 ` [RFC] Clean way to disable pager Alex Riesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).