Skip to content

Commit 5165dd5

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent a76295d commit 5165dd5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

read-cache.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2070,7 +2070,8 @@ int write_locked_index(struct index_state *istate, struct lock_file *lock,
20702070
{
20712071
struct split_index *si = istate->split_index;
20722072

2073-
if (!si || (istate->cache_changed & ~EXTMASK)) {
2073+
if (!si || alternate_index_output ||
2074+
(istate->cache_changed & ~EXTMASK)) {
20742075
if (si)
20752076
hashclr(si->base_sha1);
20762077
return do_write_locked_index(istate, lock, flags);

0 commit comments

Comments
 (0)