On Sat, Jul 13, 2013 at 12:26 AM, Thomas Gummerer <t.gumme...@gmail.com> wrote: > A partially read index file currently cannot be written to disk. Make > sure that never happens, by erroring out when a caller tries to change a > partially read index. The caller is responsible for reading the whole > index when it's trying to change it later. > > Forcing the caller to load the right part of the index file instead of > re-reading it when changing it, gives a bit of a performance advantage, > by avoiding to read parts of the index twice.
If you want to be strict about this, put similar check in fill_stat_cache_info (used by entry.c), cache_tree_invalidate_path and convert the code base (maybe except unpack-trees.c, just put a check in the beginning of unpack_trees()) to use wrapper function to change ce_flags (some still update ce_flags directly, grep them). Some flags are in memory only and should be allowed to change in partial index, some are to be written on disk and should not be allowed. -- Duy -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html