summaryrefslogtreecommitdiff
path: root/lockfile.c
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2016-06-22 17:01:59 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-06-24 15:20:47 -0700
commit95235f5ba1a9398c8503b809370ece18bba72ba2 (patch)
treeaf1681d17e9ecf2a099ffdd902ea79fb937064cd /lockfile.c
parentformat-patch: explicitly switch off color when writing to files (diff)
downloadtgif-95235f5ba1a9398c8503b809370ece18bba72ba2.tar.xz
format-patch: avoid freopen()
We just taught the relevant functions to respect the diffopt.file field, to allow writing somewhere else than stdout. Let's make use of it. Technically, we do not need to avoid that call in a builtin: we assume that builtins (as opposed to library functions) are stand-alone programs that may do with their (global) state. Yet, we want to be able to reuse that code in properly lib-ified code, e.g. when converting scripts into builtins. Further, while we did not *have* to touch the cmd_show() and cmd_cherry() code paths (because they do not want to write anywhere but stdout as of yet), it just makes sense to be consistent, making it easier and safer to move the code later. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'lockfile.c')
0 files changed, 0 insertions, 0 deletions