From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Cc: Paul Tan <pyokagan@gmail.com>, Jeff King <peff@peff.net>
Subject: [PATCH v2 3/3] am -i: fix "v"iew
Date: Wed, 17 Feb 2016 11:15:16 -0800 [thread overview]
Message-ID: <1455736516-13466-4-git-send-email-gitster@pobox.com> (raw)
In-Reply-To: <1455736516-13466-1-git-send-email-gitster@pobox.com>
The 'v'iew subcommand of the interactive mode of "git am -i" was
broken by the rewrite to C we did at around 2.6.0 timeframe at
7ff26832 (builtin-am: implement -i/--interactive, 2015-08-04); we
used to spawn the pager via the shell, accepting things like
PAGER='less -S'
in the environment, but the rewrite forgot and tried to directly
spawn a command whose name is the entire string.
The previous refactoring of the new helper function makes it easier
for us to do the right thing.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
* Essentially the same as v1, modulo adjustment for the change in 2/3
builtin/am.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/am.c b/builtin/am.c
index 1399c8d..56cf26e 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1740,7 +1740,7 @@ static int do_interactive(struct am_state *state)
if (!pager)
pager = "cat";
- argv_array_push(&cp.args, pager);
+ prepare_pager_args(&cp, pager);
argv_array_push(&cp.args, am_path(state, "patch"));
run_command(&cp);
}
--
2.7.1-489-g20b2cbe
next prev parent reply other threads:[~2016-02-17 19:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 23:06 [PATCH 0/3] fix "v"iew subcommand in "git am -i" Junio C Hamano
2016-02-16 23:06 ` [PATCH 1/3] pager: lose a separate argv[] Junio C Hamano
2016-02-16 23:06 ` [PATCH 2/3] pager: factor out a helper to prepare a child process to run the pager Junio C Hamano
2016-02-16 23:26 ` Jeff King
2016-02-16 23:49 ` Junio C Hamano
2016-02-17 0:32 ` Jeff King
2016-02-16 23:06 ` [PATCH 3/3] am -i: fix "v"iew Junio C Hamano
2016-02-17 19:15 ` [PATCH v2 0/3] fix "v"iew subcommand in "git am -i" Junio C Hamano
2016-02-17 19:15 ` [PATCH v2 1/3] pager: lose a separate argv[] Junio C Hamano
2016-02-17 19:15 ` [PATCH v2 2/3] pager: factor out a helper to prepare a child process to run the pager Junio C Hamano
2016-02-17 19:15 ` Junio C Hamano [this message]
2016-02-17 19:19 ` [PATCH v2 0/3] fix "v"iew subcommand in "git am -i" Jeff King
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=1455736516-13466-4-git-send-email-gitster@pobox.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=pyokagan@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).