diff options
author | Ronnie Sahlberg <sahlberg@google.com> | 2014-06-20 07:42:53 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-14 11:54:41 -0700 |
commit | d3f665550588d19d6d6c9f9064aa3d4685afdf4d (patch) | |
tree | 93b1e501a265d038cf47942f94cce24ff82ce67f /refs.h | |
parent | 470a91ef75d61d102c9cb655a7b8ea1555337d2d (diff) | |
download | git-d3f665550588d19d6d6c9f9064aa3d4685afdf4d.tar.gz |
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>
Diffstat (limited to 'refs.h')
-rw-r--r-- | refs.h | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); |