From: Jonathan Nieder <jrnieder@gmail.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/2] builtins: do not commit pager choice early
Date: Fri, 26 Mar 2010 15:03:47 -0500 [thread overview]
Message-ID: <20100326200347.GA11395@progeny.tock> (raw)
In-Reply-To: <1269524295-24569-1-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy wrote:
> Committing pager choice may require setting up the pager, which
> will need access to repository.
[...]
> Signed-off-by: Duy Nguyen <pclouds@gmail.com>
Tested-by: Jonathan Nieder <jrnieder@gmail.com>
Without this patch, I get
| * expecting success:
| test_terminal git --paginate rev-list HEAD &&
| test -e paginated.out
|
| fatal: internal error: access to .git/config without repo setup
| * FAIL 7: git --paginate rev-list uses a pager
and with it, t7006 passes again. I assume on your system that
test was being skipped when running tests without -v (confusing,
yes) because that test needs a tty but IO::Pty from CPAN is not
present.
> There are several possible code path after
> handle_options()/commit_pager_choice() is called:
>
> 1. list_common_cmds_help()
> 2. run_argv()
> 3. help_unknown_cmd()
>
> Case 2. will have commit_pager_choice() called inside run_builtin() if
> a command is found. Case 1. and 3. won't need a pager, it's short
> printout and should be fitted within a screen. So, removing
> commit_pager_choice() call after handle_options() is safe.
Makes sense.
Thanks,
Jonathan
prev parent reply other threads:[~2010-03-26 20:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-25 13:38 [PATCH 1/2] builtins: do not commit pager choice early Nguyễn Thái Ngọc Duy
2010-03-25 13:38 ` [PATCH 2/2] builtins: setup repository before print unknown command error Nguyễn Thái Ngọc Duy
2010-03-26 20:58 ` Jonathan Nieder
2010-03-26 20:03 ` Jonathan Nieder [this message]
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=20100326200347.GA11395@progeny.tock \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@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).