Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-02-07 09:05:22 +0300
committerJunio C Hamano <gitster@pobox.com>2019-02-07 09:05:23 +0300
commit7589e63648bf5224e186990931b1491f36e10a4b (patch)
treedfd3004e735b69ae91dc08ac4f742f1cb84eae5d /repository.h
parente52c6bbd131f1f4f17b95e28d12ead0c81a8e890 (diff)
parentf8adbec9feaa7a1ab9814db1115826e87033712e (diff)
Merge branch 'nd/the-index-final'
The assumption to work on the single "in-core index" instance has been reduced from the library-ish part of the codebase. * nd/the-index-final: cache.h: flip NO_THE_INDEX_COMPATIBILITY_MACROS switch read-cache.c: remove the_* from index_has_changes() merge-recursive.c: remove implicit dependency on the_repository merge-recursive.c: remove implicit dependency on the_index sha1-name.c: remove implicit dependency on the_index read-cache.c: replace update_index_if_able with repo_& read-cache.c: kill read_index() checkout: avoid the_index when possible repository.c: replace hold_locked_index() with repo_hold_locked_index() notes-utils.c: remove the_repository references grep: use grep_opt->repo instead of explict repo argument
Diffstat (limited to 'repository.h')
-rw-r--r--repository.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/repository.h b/repository.h
index 0e482b7d49..8981649d43 100644
--- a/repository.h
+++ b/repository.h
@@ -6,6 +6,8 @@
struct config_set;
struct git_hash_algo;
struct index_state;
+struct lock_file;
+struct pathspec;
struct raw_object_store;
struct submodule_cache;
@@ -138,5 +140,19 @@ void repo_clear(struct repository *repo);
* populated then the number of entries will simply be returned.
*/
int repo_read_index(struct repository *repo);
+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 *);
+/*
+ * Opportunistically update the index but do not complain if we can't.
+ * The lockfile is always committed or rolled back.
+ */
+void repo_update_index_if_able(struct repository *, struct lock_file *);
+
#endif /* REPOSITORY_H */