Skip to contentSkip to conversation

Move traversal of reachable objects into a separate library.

PATCH In review Junio C Hamano 1 participant 1 message Jun 15, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 4/5 Move traversal of reachable objects into a separate library.

This moves major part of builtin-prune into a separate file, reachable.c. It is used to mark the objects that are reachable from refs, and optionally from reflogs.

The patch looks very large, but if you look at it with diff -C, which this message is formatted in, most of them are copied lines and there are very little additions.

---
 Makefile                       |    1 +
 builtin-prune.c                |  195 +---------------------------------------
 builtin-prune.c => reachable.c |  123 +++----------------------
 reachable.h                    |    6 ++
 4 files changed, 22 insertions(+), 303 deletions(-)
 copy builtin-prune.c => reachable.c (69%)
 create mode 100644 reachable.h
Makefile +1 -0
index 180e1e0..d8bfb6b 100644
@@ -251,6 +251,7 @@ LIB_OBJS = \
 	interpolate.o \
 	lockfile.o \
 	object.o pack-check.o patch-delta.o path.o pkt-line.o sideband.o \
+	reachable.o \
 	quote.o read-cache.o refs.o run-command.o dir.o object-refs.o \
 	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 \
builtin-prune.c +2 -193

216 lines not on this page · raw message

reachable.c renamed from builtin-prune.c +13 -110

152 lines not on this page · raw message

reachable.h new file +6 -0
new file mode 100644
index 0000000..4075181
@@ -0,0 +1,6 @@
+#ifndef REACHEABLE_H
+#define REACHEABLE_H
+
+extern void mark_reachable_objects(struct rev_info *revs, int mark_reflog);
+
+#endif