[PATCH 28/32] read-tree: force split-index mode off on --index-output

2014-06-13 Thread Nguyễn Thái Ngọc Duy
Just a (paranoid?) safety measure..

Signed-off-by: Nguyễn Thái Ngọc Duy 
---
 read-cache.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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);
-- 
1.9.1.346.ga2b5940

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 28/32] read-tree: force split-index mode off on --index-output

2014-04-28 Thread Nguyễn Thái Ngọc Duy
Just a (paranoid?) safety measure..

Signed-off-by: Nguyễn Thái Ngọc Duy 
---
 read-cache.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/read-cache.c b/read-cache.c
index f9fc3a5..568bc20 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);
-- 
1.9.1.346.ga2b5940

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html