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 setup_git_directory();
18 do_read_index(&the_index
, av
[1], 1);
19 printf("own %s\n", oid_to_hex(&the_index
.oid
));
20 si
= the_index
.split_index
;
22 printf("not a split index\n");
25 printf("base %s\n", oid_to_hex(&si
->base_oid
));
26 for (i
= 0; i
< the_index
.cache_nr
; i
++) {
27 struct cache_entry
*ce
= the_index
.cache
[i
];
28 printf("%06o %s %d\t%s\n", ce
->ce_mode
,
29 oid_to_hex(&ce
->oid
), ce_stage(ce
), ce
->name
);
31 printf("replacements:");
32 if (si
->replace_bitmap
)
33 ewah_each_bit(si
->replace_bitmap
, show_bit
, NULL
);
34 printf("\ndeletions:");
35 if (si
->delete_bitmap
)
36 ewah_each_bit(si
->delete_bitmap
, show_bit
, NULL
);