summaryrefslogtreecommitdiff
path: root/refs.h
diff options
context:
space:
mode:
authorRonnie Sahlberg <sahlberg@google.com>2014-06-20 14:42:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-07-14 18:54:41 (GMT)
commit447ff1bf0acf9a1d7d2dc3aed032c209f105fb8a (patch)
treede6ade85f9d825f1300f06eda4a7e1627c676d64 /refs.h
parent6af926e8bcab15b42faeee9f2fe1c69b5fea1b15 (diff)
downloadgit-447ff1bf0acf9a1d7d2dc3aed032c209f105fb8a.zip
git-447ff1bf0acf9a1d7d2dc3aed032c209f105fb8a.tar.gz
git-447ff1bf0acf9a1d7d2dc3aed032c209f105fb8a.tar.bz2
lockfile.c: make lock_file return a meaningful errno on failurei
Making errno when returning from lock_file() meaningful, which should fix * an existing almost-bug in lock_ref_sha1_basic where it assumes errno==ENOENT is meaningful and could waste some work on retries * an existing bug in repack_without_refs where it prints strerror(errno) and picks advice based on errno, despite errno potentially being zero and potentially having been clobbered by that point 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 09d3564..64f25d9 100644
--- a/refs.h
+++ b/refs.h
@@ -82,6 +82,7 @@ extern void warn_dangling_symrefs(FILE *fp, const char *msg_fmt, const struct st
/*
* Lock the packed-refs file for writing. Flags is passed to
* hold_lock_file_for_update(). Return 0 on success.
+ * Errno is set to something meaningful on error.
*/
extern int lock_packed_refs(int flags);