Pass output through the pager if format-patch is run with --stdout. This saves the user the trouble of running git with '-p' or piping through a pager. setup_pager() already checks if stdout is a tty, so we don't have to worry about behaviour if the user redirects/pipes stdout. Signed-off-by: Tay Ray Chuan <rctay89@xxxxxxxxx> --- builtin/log.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index d0297a1..c631950 100644 --- 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(); if (output_directory) { if (use_stdout) -- 1.7.3.2.492.gfc3d1.dirty -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html