Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'include/git2/odb.h')
-rw-r--r--include/git2/odb.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/git2/odb.h b/include/git2/odb.h
index ad56384f0..114f6b317 100644
--- a/include/git2/odb.h
+++ b/include/git2/odb.h
@@ -159,6 +159,19 @@ GIT_EXTERN(int) git_odb_read_header(size_t *len_out, git_otype *type_out, git_od
GIT_EXTERN(int) git_odb_exists(git_odb *db, const git_oid *id);
/**
+ * Determine if objects can be found in the object database from a short OID.
+ *
+ * @param out The full OID of the found object if just one is found.
+ * @param db The database to be searched for the given object.
+ * @param short_id A prefix of the id of the object to read.
+ * @param len The length of the prefix.
+ * @return 0 if found, GIT_ENOTFOUND if not found, GIT_EAMBIGUOUS if multiple
+ * matches were found, other value < 0 if there was a read error.
+ */
+GIT_EXTERN(int) git_odb_exists_prefix(
+ git_oid *out, git_odb *db, const git_oid *short_id, size_t len);
+
+/**
* Refresh the object database to load newly added files.
*
* If the object databases have changed on disk while the library
@@ -189,7 +202,7 @@ GIT_EXTERN(int) git_odb_refresh(struct git_odb *db);
* @param db database to use
* @param cb the callback to call for each object
* @param payload data to pass to the callback
- * @return 0 on success, GIT_EUSER on non-zero callback, or error code
+ * @return 0 on success, non-zero callback return value, or error code
*/
GIT_EXTERN(int) git_odb_foreach(git_odb *db, git_odb_foreach_cb cb, void *payload);
@@ -325,7 +338,7 @@ GIT_EXTERN(int) git_odb_open_rstream(git_odb_stream **out, git_odb *db, const gi
GIT_EXTERN(int) git_odb_write_pack(
git_odb_writepack **out,
git_odb *db,
- git_transfer_progress_callback progress_cb,
+ git_transfer_progress_cb progress_cb,
void *progress_payload);
/**