read-cache: save index SHA-1 after reading
commite93021b20a73af8ff51f9ddd8c98f44fd103f360
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Fri, 13 Jun 2014 12:19:35 +0000 (13 19:19 +0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 Jun 2014 18:49:39 +0000 (13 11:49 -0700)
tree81eac1241c7421e98d705fba74ebb4e76f8faca4
parentd4a2024aef90fa5dd2b0e5027f9340719ff20748
read-cache: save index SHA-1 after reading

Also update SHA-1 after writing. If we do not do that, the second
read_index() will see "initialized" variable already set and not read
.git/index again, which is fine, except istate->sha1 now has a stale
value.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
read-cache.c
unpack-trees.c