summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
Diffstat (limited to 'commit.c')
-rw-r--r--commit.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/commit.c b/commit.c
index ac337c7d7d..246cd18b0e 100644
--- a/commit.c
+++ b/commit.c
@@ -214,6 +214,14 @@ struct commit_graft *lookup_commit_graft(const unsigned char *sha1)
return commit_graft[pos];
}
+int for_each_commit_graft(each_commit_graft_fn fn, void *cb_data)
+{
+ int i, ret;
+ for (i = ret = 0; i < commit_graft_nr && !ret; i++)
+ ret = fn(commit_graft[i], cb_data);
+ return ret;
+}
+
int write_shallow_commits(struct strbuf *out, int use_pack_protocol)
{
int i, count = 0;