am -i: fix "v"iew
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>
Junio C Hamano committed
Feb 16, 2016 at 14:46 UTC
708b8cc9a114ea1e5b90f5f52fd24ecade4e8b40
1 file changed
+1
-1
builtin/am.c
+1
-1
@@ -1740,7 +1740,7 @@ static int do_interactive(struct am_state *state)
1740
1741
if (!pager)
1742
pager = "cat";
1743
- argv_array_push(&cp.args, pager);
1743
+ prepare_pager_args(&cp, pager);
1744
argv_array_push(&cp.args, am_path(state, "patch"));
1745
run_command(&cp);
1746
}