Commit df8a9e8
git-p4: avoid crash adding symlinked directory
When submitting to P4, if git-p4 came across a symlinked
directory, then during the generation of the submit diff, it would
try to open it as a normal file and fail.
Spot symlinks (of any type) and output a description of the symlink
instead.
Add a test case.
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 454cb6b commit df8a9e8
2 files changed
+63
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
1538 | 1539 | | |
1539 | 1540 | | |
1540 | 1541 | | |
1541 | | - | |
| 1542 | + | |
1542 | 1543 | | |
1543 | 1544 | | |
1544 | 1545 | | |
| |||
1553 | 1554 | | |
1554 | 1555 | | |
1555 | 1556 | | |
1556 | | - | |
1557 | | - | |
1558 | | - | |
1559 | | - | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
1560 | 1568 | | |
1561 | 1569 | | |
1562 | 1570 | | |
| |||
1574 | 1582 | | |
1575 | 1583 | | |
1576 | 1584 | | |
| 1585 | + | |
1577 | 1586 | | |
1578 | 1587 | | |
1579 | 1588 | | |
| |||
1590 | 1599 | | |
1591 | 1600 | | |
1592 | 1601 | | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
1593 | 1607 | | |
1594 | 1608 | | |
1595 | 1609 | | |
| |||
1727 | 1741 | | |
1728 | 1742 | | |
1729 | 1743 | | |
1730 | | - | |
| 1744 | + | |
1731 | 1745 | | |
1732 | 1746 | | |
1733 | 1747 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments