repo_read_index: don't discard the index
[gitweb.git] / repository.c
index edca9074046ab1ca9826d2479bcca11018ba1873..8e60af1d5f279741b3e2df99871cbcc16bd55667 100644 (file)
@@ -235,8 +235,6 @@ int repo_read_index(struct repository *repo)
 {
        if (!repo->index)
                repo->index = xcalloc(1, sizeof(*repo->index));
-       else
-               discard_index(repo->index);
 
        return read_index_from(repo->index, repo->index_file);
 }