From 3a95f31d1cdc93fa4f926c6537f84186edd85ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 12 Jan 2019 09:13:24 +0700 Subject: repository.c: replace hold_locked_index() with repo_hold_locked_index() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- merge.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'merge.c') diff --git a/merge.c b/merge.c index 91008f7602..dbbc9d9f80 100644 --- a/merge.c +++ b/merge.c @@ -58,7 +58,7 @@ int checkout_fast_forward(struct repository *r, refresh_index(r->index, REFRESH_QUIET, NULL, NULL, NULL); - if (hold_locked_index(&lock_file, LOCK_REPORT_ON_ERROR) < 0) + if (repo_hold_locked_index(r, &lock_file, LOCK_REPORT_ON_ERROR) < 0) return -1; memset(&trees, 0, sizeof(trees)); -- cgit v1.2.3