summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f82f76)
raw | patch | inline | side by side (parent: 2f82f76)
author | Matthieu Moy <Matthieu.Moy@imag.fr> | |
Sun, 19 Aug 2007 17:24:36 +0000 (19:24 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 19 Aug 2007 21:38:45 +0000 (14:38 -0700) |
To keep the change small, this is done by setting GIT_PAGER to "cat".
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git.txt | patch | blob | history | |
git.c | patch | blob | history |
diff --git a/Documentation/git.txt b/Documentation/git.txt
index 8017997fb9bd38a0c497bf233a8f0908b33f8329..3b0d530257c66a5562ced91cc506e49d4ff484d3 100644 (file)
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
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]
-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.
index cab0e7227dfbea3c07be81317418518e55499e18..c46691e9767bedf4af9cafcd4f48d858d220e8a5 100644 (file)
--- a/git.c
+++ b/git.c
#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)
{
}
} 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" );