diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-04-04 09:12:43 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-04-04 09:57:49 -0700 |
commit | 9d227781b688707f64ee1703a1156b0c83247c33 (patch) | |
tree | 2a63a30693e7cbcc6983b5bd6f650a297e05addc /cache.h | |
parent | 6c9cd161d9d1bee349b1389d661282c92da098bc (diff) | |
download | git-9d227781b688707f64ee1703a1156b0c83247c33.tar.gz |
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>
Diffstat (limited to 'cache.h')
-rw-r--r-- | cache.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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; |