worktree: add 'list' command
[gitweb.git] / builtin / commit.c
index b37cb6c8b7966161ed156d15d9a910824b645dda..63772d016a23905d2e58bff0ad117673ed6651e7 100644 (file)
@@ -405,10 +405,8 @@ static const char *prepare_index(int argc, const char **argv, const char *prefix
                hold_locked_index(&index_lock, 1);
                refresh_cache_or_die(refresh_flags);
                if (active_cache_changed
-                   || !cache_tree_fully_valid(active_cache_tree)) {
+                   || !cache_tree_fully_valid(active_cache_tree))
                        update_main_cache_tree(WRITE_TREE_SILENT);
-                       active_cache_changed = 1;
-               }
                if (active_cache_changed) {
                        if (write_locked_index(&the_index, &index_lock,
                                               COMMIT_LOCK))