From: Michael Haggerty Date: Fri, 6 Jan 2017 16:22:34 +0000 (+0100) Subject: log_ref_setup(): pass the open file descriptor back to the caller X-Git-Tag: v2.13.0-rc0~177^2~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/e404f459fdc0d42e9ea83084cb1acdd241c14de3?ds=sidebyside;hp=e404f459fdc0d42e9ea83084cb1acdd241c14de3 log_ref_setup(): pass the open file descriptor back to the caller This function will most often be called by log_ref_write_1(), which wants to append to the reflog file. In that case, it is silly to close the file only for the caller to reopen it immediately. So, in the case that the file was opened, pass the open file descriptor back to the caller. Signed-off-by: Michael Haggerty Reviewed-by: Jeff King Signed-off-by: Junio C Hamano ---