Re: [PATCH/RFC v3 01/13] Move index v2 specific functions to their own file
From: Nguyen Thai Ngoc Duy <hidden>
Date: 2016-06-15 22:54:26
On Wed, Aug 8, 2012 at 6:17 PM, Thomas Gummerer [off-list ref] wrote:
Move index version 2 specific functions to their own file, to prepare for the addition of a new index file format. With the split into two files we have the non-index specific functions in read-cache.c and the index-v2 specific functions in read-cache-v2.c
You still mix code changes and code move in one patch, but we can skip it for now.
quoted hunk ↗ jump to hunk
--- a/cache.h +++ b/cache.h@@ -267,6 +259,7 @@ struct index_state { unsigned name_hash_initialized : 1, initialized : 1; struct hash_table name_hash; + struct index_ops *ops; };
Do we really need to modify "ops" content? If not make it "const struct index_ops *ops;" which makes..
quoted hunk ↗ jump to hunk
@@ -471,8 +464,8 @@ extern int index_name_is_other(const struct index_state *, const char *, int); #define CE_MATCH_RACY_IS_DIRTY 02 /* do stat comparison even if CE_SKIP_WORKTREE is true */ #define CE_MATCH_IGNORE_SKIP_WORKTREE 04 -extern int ie_match_stat(const struct index_state *, struct cache_entry *, struct stat *, unsigned int); -extern int ie_modified(const struct index_state *, struct cache_entry *, struct stat *, unsigned int); +extern int ie_match_stat(struct index_state *, struct cache_entry *, struct stat *, unsigned int); +extern int ie_modified(struct index_state *, struct cache_entry *, struct stat *, unsigned int);
..this hunk go away -- Duy