read-tree: note about dropping split-index mode or index version
[gitweb.git] / read-cache.c
index aa848e170f205fda3e4cc9afae115b7795612a58..b1027f7ee02f0feca35258337a0e3d116c45c7ad 100644 (file)
@@ -2070,7 +2070,8 @@ int write_locked_index(struct index_state *istate, struct lock_file *lock,
 {
        struct split_index *si = istate->split_index;
 
-       if (!si || (istate->cache_changed & ~EXTMASK)) {
+       if (!si || alternate_index_output ||
+           (istate->cache_changed & ~EXTMASK)) {
                if (si)
                        hashclr(si->base_sha1);
                return do_write_locked_index(istate, lock, flags);