Commit Diff


commit - 49307efefc236997dc103c7749064d68b089c88f
commit + 123481a5f49c26d4316bfac1b8f5599384e17d11
blob - 1be7a18011adfe942fd9dc032d0562cd20ce1673
blob + 6184577200859fe1405bbb080a18331a64692ec7
--- lib/diff_patience.c
+++ lib/diff_patience.c
@@ -317,6 +317,10 @@ diff_atoms_mark_unique_in_both(struct diff_data *left,
 			PATIENCE(b).pos_in_other = a;
 			unique_in_both_count++;
 		}
+
+		/* j now points at the first atom after 'a' that is not
+		 * identical to 'a'. j is always > i. */
+		i = j - 1;
 	}
 	*unique_in_both_count_p = unique_in_both_count;
 	rc = 0;