Commit 60d85e1
blame: simplify prepare_lines()
Changing get_next_line() to return the end pointer instead of NULL in
case no newline character is found treats allows us to treat complete
and incomplete lines the same, simplifying the code. Switching to
counting lines instead of EOLs allows us to start counting at the
first character, instead of having to call get_next_line() first.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 29aa0b2 commit 60d85e1
1 file changed
+7
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1744 | 1744 | | |
1745 | 1745 | | |
1746 | 1746 | | |
1747 | | - | |
| 1747 | + | |
1748 | 1748 | | |
1749 | 1749 | | |
1750 | 1750 | | |
| |||
1758 | 1758 | | |
1759 | 1759 | | |
1760 | 1760 | | |
1761 | | - | |
| 1761 | + | |
1762 | 1762 | | |
1763 | | - | |
| 1763 | + | |
1764 | 1764 | | |
1765 | 1765 | | |
1766 | | - | |
1767 | | - | |
| 1766 | + | |
1768 | 1767 | | |
1769 | | - | |
1770 | | - | |
1771 | | - | |
1772 | | - | |
1773 | | - | |
| 1768 | + | |
1774 | 1769 | | |
1775 | 1770 | | |
1776 | | - | |
1777 | | - | |
| 1771 | + | |
1778 | 1772 | | |
1779 | | - | |
| 1773 | + | |
1780 | 1774 | | |
1781 | 1775 | | |
1782 | 1776 | | |
| |||
0 commit comments