diff options
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/read-cache.c b/read-cache.c index e887e23fb6..9f137e7f27 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1367,6 +1367,14 @@ static int read_index_extension(struct index_state *istate, return 0; } +int hold_locked_index(struct lock_file *lk, int die_on_error) +{ + return hold_lock_file_for_update(lk, get_index_file(), + die_on_error + ? LOCK_DIE_ON_ERROR + : 0); +} + int read_index(struct index_state *istate) { return read_index_from(istate, get_index_file()); |