Improve use of lockfile API
Remove remaining double close(2)'s. i.e. close() before commit_locked_index() or commit_lock_file(). Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
d6cf61bfd4
commit
4ed7cd3ab0
@ -190,7 +190,7 @@ static void refresh_index_quietly(void)
|
||||
refresh_cache(REFRESH_QUIET|REFRESH_UNMERGED);
|
||||
|
||||
if (active_cache_changed &&
|
||||
!write_cache(fd, active_cache, active_nr) && !close(fd))
|
||||
!write_cache(fd, active_cache, active_nr))
|
||||
commit_locked_index(lock_file);
|
||||
|
||||
rollback_lock_file(lock_file);
|
||||
|
||||
Reference in New Issue
Block a user