Skip to content

Commit

Permalink
read-tree: force split-index mode off on --index-output
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Jun 13, 2014
1 parent a76295d commit 5165dd5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion read-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5165dd5

Please sign in to comment.