Make update-index always rewrite the index when a index-version is given, even if the index already has the right version. This option is used for performance testing the writer and reader.
Signed-off-by: Thomas Gummerer <t.gumme...@gmail.com> --- builtin/update-index.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builtin/update-index.c b/builtin/update-index.c index c5bb889..8b3f7a0 100644 --- a/builtin/update-index.c +++ b/builtin/update-index.c @@ -6,6 +6,7 @@ #include "cache.h" #include "quote.h" #include "cache-tree.h" +#include "read-cache.h" #include "tree-walk.h" #include "builtin.h" #include "refs.h" @@ -861,8 +862,7 @@ int cmd_update_index(int argc, const char **argv, const char *prefix) preferred_index_format, INDEX_FORMAT_LB, INDEX_FORMAT_UB); - if (the_index.version != preferred_index_format) - active_cache_changed = 1; + active_cache_changed = 1; change_cache_version(preferred_index_format); } -- 1.8.3.4.1231.g9fbf354.dirty -- 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