From: Thomas Gummerer Date: Sun, 07 Jul 2013 08:11:59 GMT Subject: [PATCH 21/22] update-index.c: rewrite index when index-version is given Message-ID: <1373184720-29767-22-git-send-email-t.gummerer@gmail.com> In-Reply-To: <1373184720-29767-1-git-send-email-t.gummerer@gmail.com> 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 --- 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 03f6426..7954ddb 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" @@ -863,8 +864,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; the_index.version = preferred_index_format; } -- 1.8.3.453.g1dfc63d