read-tree: force split-index mode off on --index-output

Just a (paranoid?) safety measure.. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Nguyễn Thái Ngọc Duy committed Jun 13, 2014 at 19:19 UTC 5165dd598a402b25301ea41fa5e0d9a72ad78393
1 file changed +2 -1
read-cache.c
+2 -1
@@ -2070,7 +2070,8 @@ int write_locked_index(struct index_state *istate, struct lock_file *lock,
2070 {
2071 struct split_index *si = istate->split_index;
2072
2073 - if (!si || (istate->cache_changed & ~EXTMASK)) {
2073 + if (!si || alternate_index_output ||
2074 + (istate->cache_changed & ~EXTMASK)) {
2075 if (si)
2076 hashclr(si->base_sha1);
2077 return do_write_locked_index(istate, lock, flags);