2 #include "split-index.h"
5 static void show_bit(size_t pos
, void *data
)
7 printf(" %d", (int)pos
);
10 int main(int ac
, char **av
)
12 struct split_index
*si
;
15 do_read_index(&the_index
, av
[1], 1);
16 printf("own %s\n", sha1_to_hex(the_index
.sha1
));
17 si
= the_index
.split_index
;
19 printf("not a split index\n");
22 printf("base %s\n", sha1_to_hex(si
->base_sha1
));
23 for (i
= 0; i
< the_index
.cache_nr
; i
++) {
24 struct cache_entry
*ce
= the_index
.cache
[i
];
25 printf("%06o %s %d\t%s\n", ce
->ce_mode
,
26 sha1_to_hex(ce
->sha1
), ce_stage(ce
), ce
->name
);
28 printf("replacements:");
29 ewah_each_bit(si
->replace_bitmap
, show_bit
, NULL
);
30 printf("\ndeletions:");
31 ewah_each_bit(si
->delete_bitmap
, show_bit
, NULL
);