3 #include "split-index.h"
6 static void show_bit(size_t pos, void *data)
8 printf(" %d", (int)pos);
11 int cmd__dump_split_index(int ac, const char **av)
13 struct split_index *si;
16 do_read_index(&the_index, av[1], 1);
17 printf("own %s\n", sha1_to_hex(the_index.sha1));
18 si = the_index.split_index;
20 printf("not a split index\n");
23 printf("base %s\n", sha1_to_hex(si->base_sha1));
24 for (i = 0; i < the_index.cache_nr; i++) {
25 struct cache_entry *ce = the_index.cache[i];
26 printf("%06o %s %d\t%s\n", ce->ce_mode,
27 oid_to_hex(&ce->oid), ce_stage(ce), ce->name);
29 printf("replacements:");
30 if (si->replace_bitmap)
31 ewah_each_bit(si->replace_bitmap, show_bit, NULL);
32 printf("\ndeletions:");
33 if (si->delete_bitmap)
34 ewah_each_bit(si->delete_bitmap, show_bit, NULL);