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:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-01-12 05:13:24 +0300
committerJunio C Hamano <gitster@pobox.com>2019-01-14 23:13:04 +0300
commit3a95f31d1cdc93fa4f926c6537f84186edd85ca9 (patch)
tree102d6623808b54f676dcbde75b1ed28705358f60 /repository.h
parent1d18d7581cf1ce45314b7ed58e52d5cc73b2e7a7 (diff)
repository.c: replace hold_locked_index() with repo_hold_locked_index()
hold_locked_index() assumes the index path at $GIT_DIR/index. This is not good for places that take an arbitrary index_state instead of the_index, which is basically everywhere except builtin/. Replace it with repo_hold_locked_index(). hold_locked_index() remains as a wrapper around repo_hold_locked_index() to reduce changes in builtin/ 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.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/repository.h b/repository.h
index 9f16c42c1e..968330218f 100644
--- a/repository.h
+++ b/repository.h
@@ -6,6 +6,7 @@
struct config_set;
struct git_hash_algo;
struct index_state;
+struct lock_file;
struct raw_object_store;
struct submodule_cache;
@@ -130,5 +131,8 @@ 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);
#endif /* REPOSITORY_H */