From: Martin Waitz <tali@admingilde.org>
To: Shawn Pearce <spearce@spearce.org>
Cc: git@vger.kernel.org
Subject: [PATCH] paginate git-diff by default
Date: Tue, 10 Oct 2006 21:16:25 +0200 [thread overview]
Message-ID: <20061010191625.GF8612@admingilde.org> (raw)
In-Reply-To: <20061010181558.GB16972@spearce.org>
On Tue, Oct 10, 2006 at 02:15:58PM -0400, Shawn Pearce wrote:
> Martin Waitz <tali@admingilde.org> wrote:
> > I always find myself typing "git -p diff".
> > Should we paginate git-diff output by default?
>
> I agree. I'm very used to git log automatically running my $PAGER;
> I'm always surprised that git diff doesn't do the same when attached
> to my tty.
so here is the overly complex implementation:
---
diff --git a/git.c b/git.c
index 03acb25..3408e81 100644
--- a/git.c
+++ b/git.c
@@ -226,7 +226,7 @@ static void handle_internal_command(int
{ "check-ref-format", cmd_check_ref_format },
{ "commit-tree", cmd_commit_tree, RUN_SETUP },
{ "count-objects", cmd_count_objects, RUN_SETUP },
- { "diff", cmd_diff, RUN_SETUP },
+ { "diff", cmd_diff, RUN_SETUP | USE_PAGER },
{ "diff-files", cmd_diff_files, RUN_SETUP },
{ "diff-index", cmd_diff_index, RUN_SETUP },
{ "diff-stages", cmd_diff_stages, RUN_SETUP },
--
Martin Waitz
next prev parent reply other threads:[~2006-10-10 19:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-10 18:13 paginate git-diff by default? Martin Waitz
2006-10-10 18:15 ` Shawn Pearce
2006-10-10 19:16 ` Martin Waitz [this message]
2006-10-11 0:57 ` [PATCH] paginate git-diff by default Junio C Hamano
2006-10-10 19:06 ` paginate git-diff by default? Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061010191625.GF8612@admingilde.org \
--to=tali@admingilde.org \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).