]> git.ipfire.org Git - thirdparty/git.git/commit
log_ref_setup(): pass the open file descriptor back to the caller
authorMichael Haggerty <mhagger@alum.mit.edu>
Fri, 6 Jan 2017 16:22:34 +0000 (17:22 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 8 Jan 2017 03:30:09 +0000 (19:30 -0800)
commite404f459fdc0d42e9ea83084cb1acdd241c14de3
tree56dcf5327ff92402a064b5a242b890ca6fa4d987
parent1fb0c809859252f037286d32f56432444d65bd38
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 <mhagger@alum.mit.edu>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/files-backend.c