Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH/RFC v3 06/13] Read index-v5

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:54:26

Nguyen Thai Ngoc Duy [off-list ref] writes:
quoted
+struct index_ops v5_ops = {
+       match_stat_basic,
+       verify_hdr,
+       read_index_v5,
+       NULL
+};
If you do it right, putting write_index_v2 here should work because
in-core structure is not changed (except that write_index_v2 is static
function, well..). Maybe putting write_index to this struct is a wrong
decision. We should be able to read_index_v5+write_index_v2 and
read_index_v2+write_index_v5.
The "right way" is to have a global API function

    write_index_in_format(int version, int fd);

which calls "the_index->index_ops.write_index[version](the_index, fd)",
no?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help