1 #define USE_THE_INDEX_VARIABLE
6 #include "split-index.h"
9 static void show_bit(size_t pos
, void *data
)
11 printf(" %d", (int)pos
);
14 int cmd__dump_split_index(int ac
, const char **av
)
16 struct split_index
*si
;
19 setup_git_directory();
21 do_read_index(&the_index
, av
[1], 1);
22 printf("own %s\n", oid_to_hex(&the_index
.oid
));
23 si
= the_index
.split_index
;
25 printf("not a split index\n");
28 printf("base %s\n", oid_to_hex(&si
->base_oid
));
29 for (i
= 0; i
< the_index
.cache_nr
; i
++) {
30 struct cache_entry
*ce
= the_index
.cache
[i
];
31 printf("%06o %s %d\t%s\n", ce
->ce_mode
,
32 oid_to_hex(&ce
->oid
), ce_stage(ce
), ce
->name
);
34 printf("replacements:");
35 if (si
->replace_bitmap
)
36 ewah_each_bit(si
->replace_bitmap
, show_bit
, NULL
);
37 printf("\ndeletions:");
38 if (si
->delete_bitmap
)
39 ewah_each_bit(si
->delete_bitmap
, show_bit
, NULL
);