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>
This commit is contained in:
committed by
Junio C Hamano
parent
1d18d7581c
commit
3a95f31d1c
@ -3643,7 +3643,7 @@ int merge_recursive_generic(struct merge_options *o,
|
||||
}
|
||||
}
|
||||
|
||||
hold_locked_index(&lock, LOCK_DIE_ON_ERROR);
|
||||
repo_hold_locked_index(the_repository, &lock, LOCK_DIE_ON_ERROR);
|
||||
clean = merge_recursive(o, head_commit, next_commit, ca,
|
||||
result);
|
||||
if (clean < 0) {
|
||||
|
||||
Reference in New Issue
Block a user