summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-01-12 02:13:24 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-01-14 20:13:04 (GMT)
commit3a95f31d1cdc93fa4f926c6537f84186edd85ca9 (patch)
tree102d6623808b54f676dcbde75b1ed28705358f60 /read-cache.c
parent1d18d7581cf1ce45314b7ed58e52d5cc73b2e7a7 (diff)
downloadgit-3a95f31d1cdc93fa4f926c6537f84186edd85ca9.zip
git-3a95f31d1cdc93fa4f926c6537f84186edd85ca9.tar.gz
git-3a95f31d1cdc93fa4f926c6537f84186edd85ca9.tar.bz2
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 'read-cache.c')
-rw-r--r--read-cache.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/read-cache.c b/read-cache.c
index 48c1797..1030e11 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -1733,11 +1733,6 @@ static int read_index_extension(struct index_state *istate,
return 0;
}
-int hold_locked_index(struct lock_file *lk, int lock_flags)
-{
- return hold_lock_file_for_update(lk, get_index_file(), lock_flags);
-}
-
int read_index(struct index_state *istate)
{
return read_index_from(istate, get_index_file(), get_git_dir());