Separate object listing routines out of rev-list
PATCH 1/2 Separate object listing routines out of rev-list
Create a separate file, list-objects.c, and move object listing routines from rev-list to it. The next round will use it in pack-objects directly.
Signed-off-by Junio C Hamano <[email protected]>
--- Makefile | 4 +- builtin-rev-list.c | 110 ++++++---------------------------------------------- list-objects.c | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++ list-objects.h | 8 ++++ 4 files changed, 130 insertions(+), 99 deletions(-)
Makefile +2 -2
@@ -233,7 +233,7 @@ XDIFF_LIB=xdiff/lib.a LIB_H = \ blob.h cache.h commit.h csum-file.h delta.h \ - diff.h object.h pack.h pkt-line.h quote.h refs.h \ + diff.h object.h pack.h pkt-line.h quote.h refs.h list-objects.h \ run-command.h strbuf.h tag.h tree.h git-compat-util.h revision.h \ tree-walk.h log-tree.h dir.h path-list.h unpack-trees.h builtin.h
@@ -250,7 +250,7 @@ LIB_OBJS = \ server-info.o setup.o sha1_file.o sha1_name.o strbuf.o \ tag.o tree.o usage.o config.o environment.o ctype.o copy.o \ fetch-clone.o revision.o pager.o tree-walk.o xdiff-interface.o \ - write_or_die.o trace.o \ + write_or_die.o trace.o list-objects.o \ alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) BUILTIN_OBJS = \
builtin-rev-list.c +13 -97
130 lines not on this page · raw message
list-objects.c new file +107 -0
107 lines not on this page · raw message
list-objects.h new file +8 -0
@@ -0,0 +1,8 @@ +#ifndef LIST_OBJECTS_H +#define LIST_OBJECTS_H + +void traverse_commit_list (struct rev_info *revs, +void (*show_commit)(struct commit *), +void (*show_object)(struct object_array_entry *)); + +#endif
Signature · 1 line
1.4.2.g552e5