summaryrefslogtreecommitdiff
path: root/src/odb.h
diff options
context:
space:
mode:
authorRussell Belfer <arrbee@arrbee.com>2012-03-12 22:55:40 -0700
committerRussell Belfer <arrbee@arrbee.com>2012-03-12 22:55:40 -0700
commite1de726c15937a8dbf81d12ef0c872cf6576ebd0 (patch)
tree84b437dd23e8250b0a4f983875fb3849569ad63a /src/odb.h
parentdda708e78f3c3f43d814d46c29ab9f2b9d47ed5c (diff)
downloadlibgit2-e1de726c15937a8dbf81d12ef0c872cf6576ebd0.tar.gz
Migrate ODB files to new error handling
This migrates odb.c, odb_loose.c, odb_pack.c and pack.c to the new style of error handling. Also got the unix and win32 versions of map.c. There are some minor changes to other files but no others were completely converted. This also contains an update to filebuf so that a zeroed out filebuf will not think that the fd (== 0) is actually open (and inadvertently call close() on fd 0 if cleaned up). Lastly, this was built and tested on win32 and contains a bunch of fixes for the win32 build which was pretty broken.
Diffstat (limited to 'src/odb.h')
-rw-r--r--src/odb.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/odb.h b/src/odb.h
index 2f84ebea4..4c425c007 100644
--- a/src/odb.h
+++ b/src/odb.h
@@ -67,4 +67,14 @@ int git_odb__hashfd(git_oid *out, git_file fd, size_t size, git_otype type);
*/
int git_odb__hashlink(git_oid *out, const char *path);
+/*
+ * Generate a GIT_ENOTFOUND error for the ODB.
+ */
+int git_odb__error_notfound(const char *message);
+
+/*
+ * Generate a GIT_EAMBIGUOUS error for the ODB.
+ */
+int git_odb__error_ambiguous(const char *message);
+
#endif