]> git.ipfire.org Git - thirdparty/git.git/blobdiff - repository.h
worktree: fix worktree add race
[thirdparty/git.git] / repository.h
index 0e482b7d49e82c3cf46d81523e057e3a02d2e8f4..8981649d43736ee283fcd23cd3185288252d5357 100644 (file)
@@ -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 */