From: Jonathan Nieder <jrnieder@gmail.com>
To: Tay Ray Chuan <rctay89@gmail.com>
Cc: Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] format-patch: page output with --stdout
Date: Mon, 22 Nov 2010 12:15:01 -0600 [thread overview]
Message-ID: <20101122181501.GF2084@burratino> (raw)
In-Reply-To: <1290229542-3116-1-git-send-email-rctay89@gmail.com>
Tay Ray Chuan wrote:
> --- a/builtin/log.c
> +++ b/builtin/log.c
> @@ -1159,6 +1159,8 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
>
> if (!use_stdout)
> output_directory = set_outdir(prefix, output_directory);
> + else
> + setup_pager();
Since it can be disabled with
[pager]
format-patch = false
this looks reasonable to me. Maybe a test to that effect would
help, something like this?
test_expect_success TTY 'format-patch --stdout paginates' '
rm -f pager_used &&
(
GIT_PAGER="wc >pager_used" &&
export GIT_PAGER &&
test_terminal git format-patch --stdout --all
) &&
test_path_is_file pager_used
'
test_expect_success TTY 'format-patch --stdout pagination can be disabled' '
rm -f pager_used &&
(
GIT_PAGER="wc >pager_used" &&
export GIT_PAGER &&
test_terminal git --no-pager format-patch --stdout --all &&
test_terminal git -c "pager.format-patch=false" format-patch --stdout --all
) &&
test_path_is_missing pager_used &&
test_path_is_missing .git/pager_used
'
next prev parent reply other threads:[~2010-11-22 18:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-20 5:05 [PATCH] format-patch: page output with --stdout Tay Ray Chuan
2010-11-22 18:15 ` Jonathan Nieder [this message]
2010-11-23 3:16 ` [PATCH v2] " Tay Ray Chuan
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=20101122181501.GF2084@burratino \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=rctay89@gmail.com \
/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).