summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rerere.c2
-rwxr-xr-xt/t4200-rerere.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/rerere.c b/rerere.c
index ea24d4c2f4..ee02dd3244 100644
--- a/rerere.c
+++ b/rerere.c
@@ -532,7 +532,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 */
diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh
index ed9e495fa7..8da998f661 100755
--- a/t/t4200-rerere.sh
+++ b/t/t4200-rerere.sh
@@ -599,7 +599,7 @@ test_expect_success 'setup simple stage 1 handling' '
)
'
-test_expect_failure 'test simple stage 1 handling' '
+test_expect_success 'test simple stage 1 handling' '
(
cd stage_1_handling &&