diff options
| author | Vicent Marti <vicent@github.com> | 2014-03-06 00:47:05 +0100 |
|---|---|---|
| committer | Vicent Marti <vicent@github.com> | 2014-03-06 00:47:05 +0100 |
| commit | a064dc2d0b6206116a35be4b62c58c3c1170d5de (patch) | |
| tree | ca3a9de862d9ec7042d5446a302cb8cf924618e1 /include/git2/sys | |
| parent | a62ad3c353380fb95d0f482859b445d430018aa9 (diff) | |
| parent | 26875825df19d484c24921e355963e75dc0a4476 (diff) | |
| download | libgit2-a064dc2d0b6206116a35be4b62c58c3c1170d5de.tar.gz | |
Merge pull request #2159 from libgit2/rb/odb-exists-prefix
Add ODB API to check for existence by prefix and object id shortener
Diffstat (limited to 'include/git2/sys')
| -rw-r--r-- | include/git2/sys/odb_backend.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/git2/sys/odb_backend.h b/include/git2/sys/odb_backend.h index 8039a5b82..4917ba0f0 100644 --- a/include/git2/sys/odb_backend.h +++ b/include/git2/sys/odb_backend.h @@ -35,11 +35,8 @@ struct git_odb_backend { int (* read)( void **, size_t *, git_otype *, git_odb_backend *, const git_oid *); - /* To find a unique object given a prefix - * of its oid. - * The oid given must be so that the - * remaining (GIT_OID_HEXSZ - len)*4 bits - * are 0s. + /* To find a unique object given a prefix of its oid. The oid given + * must be so that the remaining (GIT_OID_HEXSZ - len)*4 bits are 0s. */ int (* read_prefix)( git_oid *, void **, size_t *, git_otype *, @@ -64,6 +61,9 @@ struct git_odb_backend { int (* exists)( git_odb_backend *, const git_oid *); + int (* exists_prefix)( + git_oid *, git_odb_backend *, const git_oid *, size_t); + /** * If the backend implements a refreshing mechanism, it should be exposed * through this endpoint. Each call to `git_odb_refresh()` will invoke it. |
