diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-01-12 09:13:26 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-14 12:13:04 -0800 |
commit | e1ff0a32e48eb0f3e53970df3f941d183093ff5a (patch) | |
tree | b9d9a617170b562f93a9d262443a8bc45834ed74 /repository.h | |
parent | fb4a8464a6d7ba643a8ebdb3ad8e1e84f0a01b0a (diff) | |
download | git-e1ff0a32e48eb0f3e53970df3f941d183093ff5a.tar.gz |
read-cache.c: kill read_index()
read_index() shares the same problem as hold_locked_index(): it
assumes $GIT_DIR/index. Move all call sites to repo_read_index()
instead. read_index_preload() and read_index_unmerged() are also
killed as a consequence.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'repository.h')
-rw-r--r-- | repository.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/repository.h b/repository.h index 968330218f..cc3879add4 100644 --- a/repository.h +++ b/repository.h @@ -7,6 +7,7 @@ struct config_set; struct git_hash_algo; struct index_state; struct lock_file; +struct pathspec; struct raw_object_store; struct submodule_cache; @@ -135,4 +136,9 @@ int repo_hold_locked_index(struct repository *repo, struct lock_file *lf, int flags); +int repo_read_index_preload(struct repository *, + const struct pathspec *pathspec, + unsigned refresh_flags); +int repo_read_index_unmerged(struct repository *); + #endif /* REPOSITORY_H */ |