summaryrefslogtreecommitdiff
path: root/test-chmtime.c
diff options
context:
space:
mode:
authorSteffen Prohaska <prohaska@zib.de>2014-08-26 15:23:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-08-28 17:25:14 (GMT)
commitb29763aa9bcbb99a59aec3820e30ff1864cfa765 (patch)
treed3dcda097520b70a990e48e7ea52b9bbb9ad206d /test-chmtime.c
parent02710228dd79d9f9c6fa180233491639b603c06d (diff)
downloadgit-b29763aa9bcbb99a59aec3820e30ff1864cfa765.zip
git-b29763aa9bcbb99a59aec3820e30ff1864cfa765.tar.gz
git-b29763aa9bcbb99a59aec3820e30ff1864cfa765.tar.bz2
copy_fd(): do not close the input file descriptor
The caller, not this function, opened the file descriptor; it is selfish for the callee to close it when it is done reading from it. The caller may want an option to rewind and re-read the contents after it returns. Simplify the loop to copy the input in full to the output; its body essentially is what a call to write_in_full() helper does. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Helped-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-chmtime.c')
0 files changed, 0 insertions, 0 deletions