summaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-06-13 12:19:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-06-13 18:49:41 (GMT)
commit5165dd598a402b25301ea41fa5e0d9a72ad78393 (patch)
treecc30dd1e0c3e58ef623051449bf58163d3a1c764 /read-cache.c
parenta76295da784501f74803053606112f62ccff3828 (diff)
downloadgit-5165dd598a402b25301ea41fa5e0d9a72ad78393.zip
git-5165dd598a402b25301ea41fa5e0d9a72ad78393.tar.gz
git-5165dd598a402b25301ea41fa5e0d9a72ad78393.tar.bz2
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>
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c
index aa848e1..b1027f7 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -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);