update-index: add a new --force-write-index option
commit7c545be9a1afb8031ff4df618a1f89d0764191cd
authorBen Peart <benpeart@microsoft.com>
Fri, 22 Sep 2017 16:35:39 +0000 (22 12:35 -0400)
committerJunio C Hamano <gitster@pobox.com>
Sun, 24 Sep 2017 01:39:40 +0000 (24 10:39 +0900)
tree9b1d5780e6beb75bdbba85cec70555dfabd3053a
parent3e2c66961a9637f85eb9208466aca8f4430e89e0
update-index: add a new --force-write-index option

At times, it makes sense to avoid the cost of writing out the index
when the only changes can easily be recomputed on demand. This causes
problems when trying to write test cases to verify that state as they
can't guarantee the state has been persisted to disk.

Add a new option (--force-write-index) to update-index that will
ensure the index is written out even if the cache_changed flag is not
set.

Signed-off-by: Ben Peart <benpeart@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/update-index.c