From d3f665550588d19d6d6c9f9064aa3d4685afdf4d Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Fri, 20 Jun 2014 07:42:53 -0700 Subject: 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 Signed-off-by: Junio C Hamano Acked-by: Michael Haggerty --- refs.h | 1 + 1 file changed, 1 insertion(+) (limited to 'refs.h') diff --git a/refs.h b/refs.h index 8d6cac717b..e588ff842f 100644 --- a/refs.h +++ b/refs.h @@ -98,6 +98,7 @@ extern void add_packed_ref(const char *refname, const unsigned char *sha1); * Write the current version of the packed refs cache from memory to * disk. The packed-refs file must already be locked for writing (see * lock_packed_refs()). Return zero on success. + * Sets errno to something meaningful on error. */ extern int commit_packed_refs(void); -- cgit v1.2.3