refs.c: add a function to append a reflog entry to a fd
commit2c6207abbd6c430be06ddfef97d145d7e21446fb
authorRonnie Sahlberg <sahlberg@google.com>
Fri, 12 Dec 2014 08:56:42 +0000 (12 09:56 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Dec 2014 19:42:00 +0000 (12 11:42 -0800)
tree5fe0456248291dc56f77a81d538cf8e250e27661
parenta785d3f77c9922846f25d09fb04af9a3400ffbd1
refs.c: add a function to append a reflog entry to a fd

Break out the code to create the string and writing it to the file
descriptor from log_ref_write and add it into a dedicated function
log_ref_write_fd. It is a nice unit of work.

For now this is only used from log_ref_write, but in the future it
might have other callers.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: Stefan Beller <sbeller@google.com>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.c