author | Tay Ray Chuan <rctay89@gmail.com> | |
Tue, 23 Nov 2010 03:16:30 +0000 (11:16 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 23 Nov 2010 20:17:03 +0000 (12:17 -0800) | ||
commit | 38a94bb6bae683ba5a92969e63f1d3f2cbf41ac0 | |
tree | ce79291b650ba65ea4b0e87bc5325040988987a9 | tree | snapshot |
parent | 03276d94bcdb7d463a029936933898948c0669ac | commit | diff |
format-patch: page output with --stdout
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. Paging can
also be disabled with the config
[pager]
format-patch = false
Add tests to check for these behaviour.
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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. Paging can
also be disabled with the config
[pager]
format-patch = false
Add tests to check for these behaviour.
Helped-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/log.c | diff | blob | history | |
t/t4014-format-patch.sh | diff | blob | history |