diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-07-19 13:22:15 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-07-19 13:22:15 -0700 |
commit | 63641fb07131bede8273c3b3057792c9dcf7356b (patch) | |
tree | 9306790da18384a4ef34a1d4218b081e19b965ec /t | |
parent | Merge branch 'sb/submodule-parallel-fetch' (diff) | |
parent | mingw: fix the shortlog --output=<file> test (diff) | |
download | tgif-63641fb07131bede8273c3b3057792c9dcf7356b.tar.xz |
Merge branch 'js/log-to-diffopt-file'
The commands in the "log/diff" family have had an FILE* pointer in the
data structure they pass around for a long time, but some codepaths
used to always write to the standard output. As a preparatory step
to make "git format-patch" available to the internal callers, these
codepaths have been updated to consistently write into that FILE*
instead.
* js/log-to-diffopt-file:
mingw: fix the shortlog --output=<file> test
diff: do not color output when --color=auto and --output=<file> is given
t4211: ensure that log respects --output=<file>
shortlog: respect the --output=<file> setting
format-patch: use stdout directly
format-patch: avoid freopen()
format-patch: explicitly switch off color when writing to files
shortlog: support outputting to streams other than stdout
graph: respect the diffopt.file setting
line-log: respect diffopt's configured output file stream
log-tree: respect diffopt's configured output file stream
log: prepare log/log-tree to reuse the diffopt.close_file attribute
Diffstat (limited to 't')
-rwxr-xr-x | t/t4201-shortlog.sh | 6 | ||||
-rwxr-xr-x | t/t4211-line-log.sh | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh index a9773658f0..ae08b57712 100755 --- a/t/t4201-shortlog.sh +++ b/t/t4201-shortlog.sh @@ -184,4 +184,10 @@ test_expect_success 'shortlog with revision pseudo options' ' git shortlog --exclude=refs/heads/m* --all ' +test_expect_success 'shortlog with --output=<file>' ' + git shortlog --output=shortlog -1 master >output && + test ! -s output && + test_line_count = 3 shortlog +' + test_done diff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh index 4451127eb2..9d87777b59 100755 --- a/t/t4211-line-log.sh +++ b/t/t4211-line-log.sh @@ -99,4 +99,11 @@ test_expect_success '-L with --first-parent and a merge' ' git log --first-parent -L 1,1:b.c ' +test_expect_success '-L with --output' ' + git checkout parallel-change && + git log --output=log -L :main:b.c >output && + test ! -s output && + test_line_count = 70 log +' + test_done |