| 704 | } |
| 705 | |
| 706 | static void add_line_range(struct rev_info *revs, struct commit *commit, |
| 707 | struct line_log_data *range) |
| 708 | { |
| 709 | struct line_log_data *old_line = NULL; |
| 710 | struct line_log_data *new_line = NULL; |
| 711 | |
| 712 | old_line = lookup_decoration(&revs->line_log_data, &commit->object); |
| 713 | if (old_line && range) { |
| 714 | new_line = line_log_data_merge(old_line, range); |
| 715 | free_line_log_data(old_line); |
| 716 | } else if (range) |
| 717 | new_line = line_log_data_copy(range); |
| 718 | |
| 719 | if (new_line) |
| 720 | add_decoration(&revs->line_log_data, &commit->object, new_line); |
| 721 | } |
| 722 | |
| 723 | static void clear_commit_line_range(struct rev_info *revs, struct commit *commit) |
| 724 | { |
no test coverage detected