test-delta$X: test-delta.c diff-delta.o patch-delta.o
$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $^ -lz
+ test-dump-cache-tree$X: dump-cache-tree.o $(GITLIBS)
+ $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS)
+
+test-gsimm$X: test-gsimm.c gsimm.o rabinpoly.o
+ $(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $^
+
check:
for i in *.c; do sparse $(ALL_CFLAGS) $(SPARSE_FLAGS) $$i || exit; done
#include "cache.h"
#include "strbuf.h"
#include "quote.h"
- #include "tree.h"
+#include "tree-walk.h"
#include "cache-tree.h"
- static unsigned char active_cache_sha1[20];
- static struct cache_tree *active_cache_tree;
-
/*
* Default to not allowing changes to the list of files. The
* tool doesn't actually care, but this makes it harder to add
free(path_name);
}
}
+
+ finish:
if (active_cache_changed) {
- if (write_cache_1(newfd, active_cache, active_nr,
- active_cache_sha1) ||
+ if (write_cache(newfd, active_cache, active_nr) ||
commit_index_file(&cache_file))
die("Unable to write new cachefile");
- write_cache_tree(active_cache_sha1, active_cache_tree);
}
return has_errors ? 1 : 0;