refs.c: commit_packed_refs to return a meaningful errno on failure
commitd3f665550588d19d6d6c9f9064aa3d4685afdf4d
authorRonnie Sahlberg <sahlberg@google.com>
Fri, 20 Jun 2014 14:42:53 +0000 (20 07:42 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Jul 2014 18:54:41 +0000 (14 11:54 -0700)
tree93b1e501a265d038cf47942f94cce24ff82ce67f
parent470a91ef75d61d102c9cb655a7b8ea1555337d2d
refs.c: commit_packed_refs to return a meaningful errno on failure

Making errno when returning from commit_packed_refs() meaningful,
which should fix

 * a bug in "git clone" where it prints strerror(errno) based on
   errno, despite errno possibly being zero and potentially having
   been clobbered by that point
 * the same kind of bug in "git pack-refs"

and prepares for repack_without_refs() to get a meaningful
error message when commit_packed_refs() fails without falling into
the same bug.

Signed-off-by: Ronnie Sahlberg <sahlberg@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Acked-by: Michael Haggerty <mhagger@alum.mit.edu>
refs.c
refs.h