| 551 | }; |
| 552 | |
| 553 | static const char *nth_line(void *data, long line) |
| 554 | { |
| 555 | struct nth_line_cb *d = data; |
| 556 | assert(d && line <= d->lines); |
| 557 | assert(d->spec && d->spec->data); |
| 558 | |
| 559 | if (line == 0) |
| 560 | return (char *)d->spec->data; |
| 561 | else |
| 562 | return (char *)d->spec->data + d->line_ends[line] + 1; |
| 563 | } |
| 564 | |
| 565 | static struct line_log_data * |
| 566 | parse_lines(struct repository *r, struct commit *commit, |