Commit be8ed50
restore: make pathspec mandatory
"git restore" without arguments does not make much sense when
it's about restoring files (what files now?). We could default to
either
git restore .
or
git restore :/
Neither is intuitive. Make the user always give pathspec, force the
user to think the scope of restore they want because this is a
destructive operation.
"git restore -p" without pathspec is an exception to this
because it really is a separate mode. It will be treated as running
patch mode on the whole worktree.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent c9c935f commit be8ed50
1 file changed
+7
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
1515 | 1516 | | |
1516 | 1517 | | |
1517 | 1518 | | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
1518 | 1523 | | |
1519 | 1524 | | |
1520 | 1525 | | |
| |||
1601 | 1606 | | |
1602 | 1607 | | |
1603 | 1608 | | |
| 1609 | + | |
1604 | 1610 | | |
1605 | 1611 | | |
1606 | 1612 | | |
| |||
1664 | 1670 | | |
1665 | 1671 | | |
1666 | 1672 | | |
| 1673 | + | |
1667 | 1674 | | |
1668 | 1675 | | |
1669 | 1676 | | |
| |||
0 commit comments