1 #define USE_THE_INDEX_VARIABLE
5 #include "repository.h"
7 #include "split-index.h"
10 static void show_bit(size_t pos
, void *data
)
12 printf(" %d", (int)pos
);
15 int cmd__dump_split_index(int ac UNUSED
, const char **av
)
17 struct split_index
*si
;
20 setup_git_directory();
22 do_read_index(&the_index
, av
[1], 1);
23 printf("own %s\n", oid_to_hex(&the_index
.oid
));
24 si
= the_index
.split_index
;
26 printf("not a split index\n");
29 printf("base %s\n", oid_to_hex(&si
->base_oid
));
30 for (i
= 0; i
< the_index
.cache_nr
; i
++) {
31 struct cache_entry
*ce
= the_index
.cache
[i
];
32 printf("%06o %s %d\t%s\n", ce
->ce_mode
,
33 oid_to_hex(&ce
->oid
), ce_stage(ce
), ce
->name
);
35 printf("replacements:");
36 if (si
->replace_bitmap
)
37 ewah_each_bit(si
->replace_bitmap
, show_bit
, NULL
);
38 printf("\ndeletions:");
39 if (si
->delete_bitmap
)
40 ewah_each_bit(si
->delete_bitmap
, show_bit
, NULL
);