subtree: make --ignore-joins pay attention to adds
[gitweb.git] / rerere.c
index 2fd3181f7beb7e2b19e4ca7ae26a50d703b60728..7aa149e849775f110231a54cda7b71f60e75cb4f 100644 (file)
--- a/rerere.c
+++ b/rerere.c
@@ -521,7 +521,7 @@ static int check_one_conflict(int i, int *type)
        }
 
        *type = PUNTED;
-       while (ce_stage(active_cache[i]) == 1)
+       while (i < active_nr && ce_stage(active_cache[i]) == 1)
                i++;
 
        /* Only handle regular files with both stages #2 and #3 */