diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-01-12 03:13:24 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-14 21:13:04 +0100 |
commit | 3a95f31d1cdc93fa4f926c6537f84186edd85ca9 (patch) | |
tree | 102d6623808b54f676dcbde75b1ed28705358f60 /rerere.c | |
parent | notes-utils.c: remove the_repository references (diff) | |
download | git-3a95f31d1cdc93fa4f926c6537f84186edd85ca9.tar.xz git-3a95f31d1cdc93fa4f926c6537f84186edd85ca9.zip |
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 'rerere.c')
-rw-r--r-- | rerere.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -705,7 +705,7 @@ static void update_paths(struct repository *r, struct string_list *update) struct lock_file index_lock = LOCK_INIT; int i; - hold_locked_index(&index_lock, LOCK_DIE_ON_ERROR); + repo_hold_locked_index(r, &index_lock, LOCK_DIE_ON_ERROR); for (i = 0; i < update->nr; i++) { struct string_list_item *item = &update->items[i]; |