summaryrefslogtreecommitdiff
path: root/list-objects.h
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2009-04-06 19:28:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-04-08 05:12:38 (GMT)
commit11c211fa06fc396e8ee8132ef83e2f2763ff6976 (patch)
tree852484cc0f26ae0fd0f968b384040e591b09b9d0 /list-objects.h
parente89aa6d2f546b2d4f2d88c15ce7e343751d6922f (diff)
downloadgit-11c211fa06fc396e8ee8132ef83e2f2763ff6976.zip
git-11c211fa06fc396e8ee8132ef83e2f2763ff6976.tar.gz
git-11c211fa06fc396e8ee8132ef83e2f2763ff6976.tar.bz2
list-objects: add "void *data" parameter to show functions
The goal of this patch is to get rid of the "static struct rev_info revs" static variable in "builtin-rev-list.c". To do that, we need to pass the revs to the "show_commit" function in "builtin-rev-list.c" and this in turn means that the "traverse_commit_list" function in "list-objects.c" must be passed functions pointers to functions with 2 parameters instead of one. So we have to change all the callers and all the functions passed to "traverse_commit_list". Anyway this makes the code more clean and more generic, so it should be a good thing in the long run. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'list-objects.h')
-rw-r--r--list-objects.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/list-objects.h b/list-objects.h
index 0f41391..47fae2e 100644
--- a/list-objects.h
+++ b/list-objects.h
@@ -1,11 +1,11 @@
#ifndef LIST_OBJECTS_H
#define LIST_OBJECTS_H
-typedef void (*show_commit_fn)(struct commit *);
-typedef void (*show_object_fn)(struct object_array_entry *);
+typedef void (*show_commit_fn)(struct commit *, void *);
+typedef void (*show_object_fn)(struct object_array_entry *, void *);
typedef void (*show_edge_fn)(struct commit *);
-void traverse_commit_list(struct rev_info *revs, show_commit_fn, show_object_fn);
+void traverse_commit_list(struct rev_info *, show_commit_fn, show_object_fn, void *);
void mark_edges_uninteresting(struct commit_list *, struct rev_info *, show_edge_fn);