{"thread":{"id":"5874","subject":"paginate git-diff by default?","startedAt":"2006-10-10T18:13:37Z","lastAt":"2006-10-11T00:57:58Z","messageCount":5,"participants":["Martin Waitz","Shawn Pearce","Johannes Schindelin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"28531","messageId":"20061010181337.GE8612@admingilde.org","threadId":"5874","inReplyTo":null,"subject":"paginate git-diff by default?","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-10-10T18:13:37Z","receivedAt":"2006-10-10T18:13:37Z","isPatch":false,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :)\n\nI always find myself typing \"git -p diff\".\nShould we paginate git-diff output by default?\n\nI was sure this was discussed before but I could not immediately\nfind it, so I'm simply asking again ;-).\n\n-- \nMartin Waitz\n"},{"id":"28532","messageId":"20061010181558.GB16972@spearce.org","threadId":"5874","inReplyTo":"20061010181337.GE8612@admingilde.org","subject":"Re: paginate git-diff by default?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-10-10T18:15:58Z","receivedAt":"2006-10-10T18:15:58Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Martin Waitz <tali@admingilde.org> wrote:\n> hoi :)\n> \n> I always find myself typing \"git -p diff\".\n> Should we paginate git-diff output by default?\n> \n> I was sure this was discussed before but I could not immediately\n> find it, so I'm simply asking again ;-).\n\nI agree.  I'm very used to git log automatically running my $PAGER;\nI'm always surprised that git diff doesn't do the same when attached\nto my tty.\n\n-- \nShawn.\n"},{"id":"28539","messageId":"Pine.LNX.4.63.0610102104210.14200@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"5874","inReplyTo":"20061010181337.GE8612@admingilde.org","subject":"Re: paginate git-diff by default?","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-10-10T19:06:19Z","receivedAt":"2006-10-10T19:06:19Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 10 Oct 2006, Martin Waitz wrote:\n\n> I always find myself typing \"git -p diff\".\n\nI don't. Because I have an alias \"pd\" for that on all of my machines. ;')\n\nCiao,\nDscho\n"},{"id":"28540","messageId":"20061010191625.GF8612@admingilde.org","threadId":"5874","inReplyTo":"20061010181558.GB16972@spearce.org","subject":"[PATCH] paginate git-diff by default","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-10-10T19:16:25Z","receivedAt":"2006-10-10T19:16:25Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"On Tue, Oct 10, 2006 at 02:15:58PM -0400, Shawn Pearce wrote:\n> Martin Waitz <tali@admingilde.org> wrote:\n> > I always find myself typing \"git -p diff\".\n> > Should we paginate git-diff output by default?\n>\n> I agree.  I'm very used to git log automatically running my $PAGER;\n> I'm always surprised that git diff doesn't do the same when attached\n> to my tty.\n\nso here is the overly complex implementation:\n\n---\ndiff --git a/git.c b/git.c\nindex 03acb25..3408e81 100644\n--- a/git.c\n+++ b/git.c\n@@ -226,7 +226,7 @@ static void handle_internal_command(int\n \t\t{ \"check-ref-format\", cmd_check_ref_format },\n \t\t{ \"commit-tree\", cmd_commit_tree, RUN_SETUP },\n \t\t{ \"count-objects\", cmd_count_objects, RUN_SETUP },\n-\t\t{ \"diff\", cmd_diff, RUN_SETUP },\n+\t\t{ \"diff\", cmd_diff, RUN_SETUP | USE_PAGER },\n \t\t{ \"diff-files\", cmd_diff_files, RUN_SETUP },\n \t\t{ \"diff-index\", cmd_diff_index, RUN_SETUP },\n \t\t{ \"diff-stages\", cmd_diff_stages, RUN_SETUP },\n\n-- \nMartin Waitz\n"},{"id":"28571","messageId":"7vwt77y8h5.fsf@assigned-by-dhcp.cox.net","threadId":"5874","inReplyTo":"20061010191625.GF8612@admingilde.org","subject":"Re: [PATCH] paginate git-diff by default","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-10-11T00:57:58Z","receivedAt":"2006-10-11T00:57:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Waitz <tali@admingilde.org> writes:\n\n> On Tue, Oct 10, 2006 at 02:15:58PM -0400, Shawn Pearce wrote:\n>> Martin Waitz <tali@admingilde.org> wrote:\n>> > I always find myself typing \"git -p diff\".\n>> > Should we paginate git-diff output by default?\n>>\n>> I agree.  I'm very used to git log automatically running my $PAGER;\n>> I'm always surprised that git diff doesn't do the same when attached\n>> to my tty.\n\nHmm.  So close to 1.4.3...  Will take it.\n"}]}