summaryrefslogtreecommitdiff
path: root/src/git/odb.h
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2009-06-04 16:47:59 +0100
committerAndreas Ericsson <ae@op5.se>2009-06-05 10:22:20 +0200
commite17a3f5673e0dc4d9ade34a0a276e6c202506fdf (patch)
treed9a9eb65ed8db7f1200aa017e5ea2204266e7ae4 /src/git/odb.h
parentca481fc4f12cec56b71bd50ae72e3f088b69021f (diff)
downloadlibgit2-e17a3f5673e0dc4d9ade34a0a276e6c202506fdf.tar.gz
Implement git_odb_write()
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Andreas Ericsson <ae@op5.se>
Diffstat (limited to 'src/git/odb.h')
-rw-r--r--src/git/odb.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/git/odb.h b/src/git/odb.h
index 8a8cd3e5f..58b932645 100644
--- a/src/git/odb.h
+++ b/src/git/odb.h
@@ -96,6 +96,18 @@ GIT_EXTERN(int) git_odb__read_packed(git_obj *out, git_odb *db, const git_oid *i
GIT_EXTERN(int) git_odb__read_loose(git_obj *out, git_odb *db, const git_oid *id);
/**
+ * Write an object to the database.
+ *
+ * @param id identity of the object written.
+ * @param db database to which the object should be written.
+ * @param obj object descriptor for the object to write.
+ * @return
+ * - GIT_SUCCESS if the object was written;
+ * - GIT_ERROR otherwise.
+ */
+GIT_EXTERN(int) git_odb_write(git_oid *id, git_odb *db, git_obj *obj);
+
+/**
* Release all memory used by the obj structure.
*
* As a result of this call, obj->data will be set to NULL.