From: Junio C Hamano Date: Wed, 7 Dec 2016 19:11:26 +0000 (-0800) Subject: wt-status: implement opportunisitc index update correctly X-Git-Tag: v2.12.0-rc0~128^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/89d38fb26664038a85eb5a0da8fa4d23228e450d?hp=89d38fb26664038a85eb5a0da8fa4d23228e450d wt-status: implement opportunisitc index update correctly The require_clean_work_tree() function calls hold_locked_index() with die_on_error=0 to signal that it is OK if it fails to obtain the lock, but unconditionally calls update_index_if_able(), which will try to write into fd=-1. Signed-off-by: Junio C Hamano ---