From 4947367267cbcd0ca528711b2393613e2e817878 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Thu, 1 Sep 2011 15:43:33 -0700 Subject: list-objects: pass callback data to show_objects() The traverse_commit_list() API takes two callback functions, one to show commit objects, and the other to show other kinds of objects. Even though the former has a callback data parameter, so that the callback does not have to rely on global state, the latter does not. Give the show_objects() callback the same callback data parameter. Signed-off-by: Junio C Hamano --- builtin/pack-objects.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'builtin/pack-objects.c') diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index f402a843bb..fca6cb5635 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -1936,7 +1936,9 @@ static void show_commit(struct commit *commit, void *data) commit->object.flags |= OBJECT_ADDED; } -static void show_object(struct object *obj, const struct name_path *path, const char *last) +static void show_object(struct object *obj, + const struct name_path *path, const char *last, + void *data) { char *name = path_name(path, last); -- cgit 1.2.3-korg