summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2011-08-18 12:29:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-18 18:00:14 (GMT)
commit09d46644b780ede1a6b757db3e1a1ae9c1128a13 (patch)
treec45305c4c84b9b5e6789421c338bf3fa760274bd /commit.h
parent594ffe80e7827b20335c5c6dde2cf57c9919db68 (diff)
downloadgit-09d46644b780ede1a6b757db3e1a1ae9c1128a13.zip
git-09d46644b780ede1a6b757db3e1a1ae9c1128a13.tar.gz
git-09d46644b780ede1a6b757db3e1a1ae9c1128a13.tar.bz2
Add for_each_commit_graft() to iterate all grafts
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
-rw-r--r--commit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/commit.h b/commit.h
index a2d571b..9bf3fef 100644
--- a/commit.h
+++ b/commit.h
@@ -142,6 +142,7 @@ struct commit_graft {
int nr_parent; /* < 0 if shallow commit */
unsigned char parent[FLEX_ARRAY][20]; /* more */
};
+typedef int (*each_commit_graft_fn)(const struct commit_graft *, void *);
struct commit_graft *read_graft_line(char *buf, int len);
int register_commit_graft(struct commit_graft *, int);
@@ -154,6 +155,7 @@ extern struct commit_list *get_octopus_merge_bases(struct commit_list *in);
extern int register_shallow(const unsigned char *sha1);
extern int unregister_shallow(const unsigned char *sha1);
extern int write_shallow_commits(struct strbuf *out, int use_pack_protocol);
+extern int for_each_commit_graft(each_commit_graft_fn, void *);
extern int is_repository_shallow(void);
extern struct commit_list *get_shallow_commits(struct object_array *heads,
int depth, int shallow_flag, int not_shallow_flag);