* Given a diff and the set of interesting ranges, map the ranges * across the diff. That is: observe that the target commit takes * blame for all the + (target-side) ranges. So for every pair of * ranges in the diff that was touched, we remove the latter and add * its parent side. */
| 455 | * its parent side. |
| 456 | */ |
| 457 | static void range_set_map_across_diff(struct range_set *out, |
| 458 | struct range_set *rs, |
| 459 | struct diff_ranges *diff, |
| 460 | struct diff_ranges **touched_out) |
| 461 | { |
| 462 | struct diff_ranges *touched = xmalloc(sizeof(*touched)); |
| 463 | struct range_set tmp1 = RANGE_SET_INIT; |
| 464 | struct range_set tmp2 = RANGE_SET_INIT; |
| 465 | |
| 466 | diff_ranges_init(touched); |
| 467 | diff_ranges_filter_touched(touched, diff, rs); |
| 468 | range_set_difference(&tmp1, rs, &touched->target); |
| 469 | range_set_shift_diff(&tmp2, &tmp1, diff); |
| 470 | range_set_union(out, &tmp2, &touched->parent); |
| 471 | range_set_release(&tmp1); |
| 472 | range_set_release(&tmp2); |
| 473 | |
| 474 | *touched_out = touched; |
| 475 | } |
| 476 | |
| 477 | static struct commit *check_single_commit(struct rev_info *revs) |
| 478 | { |
no test coverage detected