Commit e0eb6b9
fast-import: allow ls or filecopy of the root tree
Commit 178e1de (fast-import: don't allow 'ls' of path with empty
components, 2012-03-09) restricted paths which:
. contain an empty directory component (e.g. foo//bar is invalid),
. end with a directory separator (e.g. foo/ is invalid),
. start with a directory separator (e.g. /foo is invalid).
However, the implementation also caught the empty path, which should
represent the root tree. Relax this restriction so that the empty path
is explicitly allowed and refers to the root tree.
Reported-by: Dave Abrahams <dave@boostpro.com>
Signed-off-by: John Keeping <john@keeping.me.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent adefdba commit e0eb6b9
2 files changed
+24
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1629 | 1629 | | |
1630 | 1630 | | |
1631 | 1631 | | |
1632 | | - | |
| 1632 | + | |
| 1633 | + | |
1633 | 1634 | | |
1634 | 1635 | | |
1635 | 1636 | | |
| |||
1641 | 1642 | | |
1642 | 1643 | | |
1643 | 1644 | | |
1644 | | - | |
| 1645 | + | |
1645 | 1646 | | |
1646 | 1647 | | |
1647 | 1648 | | |
1648 | 1649 | | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
1649 | 1656 | | |
1650 | 1657 | | |
1651 | 1658 | | |
1652 | 1659 | | |
1653 | | - | |
1654 | | - | |
1655 | | - | |
1656 | | - | |
1657 | | - | |
1658 | | - | |
1659 | | - | |
1660 | | - | |
| 1660 | + | |
| 1661 | + | |
1661 | 1662 | | |
1662 | 1663 | | |
1663 | 1664 | | |
1664 | 1665 | | |
1665 | | - | |
| 1666 | + | |
1666 | 1667 | | |
1667 | 1668 | | |
1668 | 1669 | | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
1669 | 1678 | | |
1670 | 1679 | | |
1671 | 1680 | | |
| |||
2415 | 2424 | | |
2416 | 2425 | | |
2417 | 2426 | | |
2418 | | - | |
| 2427 | + | |
2419 | 2428 | | |
2420 | 2429 | | |
2421 | 2430 | | |
| |||
3067 | 3076 | | |
3068 | 3077 | | |
3069 | 3078 | | |
3070 | | - | |
| 3079 | + | |
3071 | 3080 | | |
3072 | 3081 | | |
3073 | 3082 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1253 | 1253 | | |
1254 | 1254 | | |
1255 | 1255 | | |
1256 | | - | |
| 1256 | + | |
1257 | 1257 | | |
1258 | 1258 | | |
1259 | 1259 | | |
| |||
2988 | 2988 | | |
2989 | 2989 | | |
2990 | 2990 | | |
2991 | | - | |
| 2991 | + | |
2992 | 2992 | | |
2993 | 2993 | | |
2994 | 2994 | | |
| |||
0 commit comments