summaryrefslogtreecommitdiff
path: root/include/git2/odb_backend.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2012-06-05 14:48:51 +0200
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-07-03 12:50:51 +0200
commit521aedad307c6f72d6f6d660943508b2b015f6dd (patch)
treeaef33032b13ca170a3d7a016e7e8522a7635ce6f /include/git2/odb_backend.h
parente560aa8ffa7cf143fbd34a5aec44741ae4c77271 (diff)
downloadlibgit2-521aedad307c6f72d6f6d660943508b2b015f6dd.tar.gz
odb: add git_odb_foreach()
Go through each backend and list every objects that exists in them. This allows fsck-like uses.
Diffstat (limited to 'include/git2/odb_backend.h')
-rw-r--r--include/git2/odb_backend.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/git2/odb_backend.h b/include/git2/odb_backend.h
index f4620f5f4..3f67202d1 100644
--- a/include/git2/odb_backend.h
+++ b/include/git2/odb_backend.h
@@ -71,6 +71,12 @@ struct git_odb_backend {
struct git_odb_backend *,
const git_oid *);
+ int (*foreach)(
+ struct git_odb_backend *,
+ int (*cb)(git_oid *oid, void *data),
+ void *data
+ );
+
void (* free)(struct git_odb_backend *);
};