[PATCH 1/3] repo_read_index: don't discard the index
- From
- Brandon Williams <bmwill@google.com>
- Date
- Jul 11, 2017, 22:04 UTC
- Message-ID
- <20170711220408.173269-2-bmwill@google.com>
- In-Reply-To
- <20170711220408.173269-1-bmwill@google.com>
Have 'repo_read_index()' behave more like the other read_index family of functions and don't discard the index if it has already been populated.
Signed-off-by: Brandon Williams <bmwill@google.com> --- repository.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/repository.c b/repository.c index edca90740..8e60af1d5 100644 --- a/repository.c +++ b/repository.c @@ -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); }
-- 2.13.2.932.g7449e964c-goog