refs.c: add err arguments to reflog functions
authorDavid Turner <dturner@twopensource.com>
Tue, 21 Jul 2015 21:04:50 +0000 (17:04 -0400)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Jul 2015 21:07:28 +0000 (14:07 -0700)
Add an err argument to log_ref_setup that can explain the reason
for a failure. This then eliminates the need to manage errno through
this function since we can just add strerror(errno) to the err string
when meaningful. No callers relied on errno from this function for
anything else than the error message.

Also add err arguments to private functions write_ref_to_lockfile,
log_ref_write_1, commit_ref_update. This again eliminates the need to
manage errno in these functions.

Some error messages are slightly reordered.

Update of a patch by Ronnie Sahlberg.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found