summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorRonnie Sahlberg <sahlberg@google.com>2014-06-20 14:42:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-14 18:54:41 (GMT)
commitd3f665550588d19d6d6c9f9064aa3d4685afdf4d (patch)
tree93b1e501a265d038cf47942f94cce24ff82ce67f /refs.h
parent470a91ef75d61d102c9cb655a7b8ea1555337d2d (diff)
downloadgit-d3f665550588d19d6d6c9f9064aa3d4685afdf4d.zip
git-d3f665550588d19d6d6c9f9064aa3d4685afdf4d.tar.gz
git-d3f665550588d19d6d6c9f9064aa3d4685afdf4d.tar.bz2
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.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/refs.h b/refs.h
index 8d6cac7..e588ff8 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);