"git -p cmd" to page anywhere

This allows you to say:

	git -p diff v2.6.16-rc5..

and the command pipes the output of any git command to your pager.

[jc: this resurrects a month old RFC patch with improvement
 suggested by Linus to call it --paginate instead of --less.]

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2006-06-06 16:58:40 -07:00
parent cfc01c0387
commit 85fb65ed6e
4 changed files with 11 additions and 1 deletions

5
git.c
View File

@ -251,6 +251,11 @@ int main(int argc, const char **argv, char **envp)
cmd = *++argv;
argc--;
if (!strcmp(cmd, "-p") || !strcmp(cmd, "--paginate")) {
setup_pager();
continue;
}
if (strncmp(cmd, "--", 2))
break;