Commit 5708809
add-patch: modify patch_update_file() signature
The function `patch_update_file()` takes the add_p_state struct
pointer and the current `struct file_diff` pointer and returns an
int.
When using the `--no-auto-advance` flag, we want to be able to request
the next or previous file from the caller.
Modify the function signature to instead take the index of the
current `file_diff` and the `add_p_state` struct pointer so that we
can compute the `file_diff` from the index while also having
access to the file index. This will help us request the next or
previous file from the caller.
Signed-off-by: Abraham Samuel Adekunle <abrahamadekunle50@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 06c81a1 commit 5708809
1 file changed
Lines changed: 19 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1441 | 1441 | | |
1442 | 1442 | | |
1443 | 1443 | | |
1444 | | - | |
1445 | | - | |
| 1444 | + | |
1446 | 1445 | | |
1447 | 1446 | | |
1448 | 1447 | | |
1449 | 1448 | | |
1450 | 1449 | | |
1451 | 1450 | | |
1452 | | - | |
| 1451 | + | |
1453 | 1452 | | |
| 1453 | + | |
| 1454 | + | |
1454 | 1455 | | |
1455 | 1456 | | |
1456 | 1457 | | |
1457 | | - | |
| 1458 | + | |
1458 | 1459 | | |
1459 | 1460 | | |
1460 | 1461 | | |
| |||
1498 | 1499 | | |
1499 | 1500 | | |
1500 | 1501 | | |
1501 | | - | |
1502 | | - | |
1503 | | - | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1504 | 1506 | | |
1505 | 1507 | | |
1506 | 1508 | | |
| |||
1570 | 1572 | | |
1571 | 1573 | | |
1572 | 1574 | | |
1573 | | - | |
| 1575 | + | |
1574 | 1576 | | |
1575 | 1577 | | |
1576 | 1578 | | |
| |||
1616 | 1618 | | |
1617 | 1619 | | |
1618 | 1620 | | |
1619 | | - | |
| 1621 | + | |
1620 | 1622 | | |
1621 | 1623 | | |
1622 | 1624 | | |
| |||
1803 | 1805 | | |
1804 | 1806 | | |
1805 | 1807 | | |
1806 | | - | |
| 1808 | + | |
1807 | 1809 | | |
1808 | 1810 | | |
1809 | 1811 | | |
| |||
1852 | 1854 | | |
1853 | 1855 | | |
1854 | 1856 | | |
1855 | | - | |
1856 | | - | |
| 1857 | + | |
| 1858 | + | |
1857 | 1859 | | |
1858 | | - | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
1859 | 1864 | | |
| 1865 | + | |
1860 | 1866 | | |
1861 | 1867 | | |
1862 | 1868 | | |
| |||
0 commit comments