read-cache.c: write prefix-compressed names in the index
Teach the code to write the index in the v4 on-disk format. Record the format version of the on-disk index we read from in the index_state, and use the format when writing the new index out. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
4
cache.h
4
cache.h
@ -105,6 +105,9 @@ struct cache_header {
|
||||
unsigned int hdr_entries;
|
||||
};
|
||||
|
||||
#define INDEX_FORMAT_LB 2
|
||||
#define INDEX_FORMAT_UB 4
|
||||
|
||||
/*
|
||||
* The "cache_time" is just the low 32 bits of the
|
||||
* time. It doesn't matter if it overflows - we only
|
||||
@ -265,6 +268,7 @@ static inline unsigned int canon_mode(unsigned int mode)
|
||||
|
||||
struct index_state {
|
||||
struct cache_entry **cache;
|
||||
unsigned int version;
|
||||
unsigned int cache_nr, cache_alloc, cache_changed;
|
||||
struct string_list *resolve_undo;
|
||||
struct cache_tree *cache_tree;
|
||||
|
Reference in New Issue
Block a user