Commit e33d91c
committed
stash: add --include-untracked support to git stash create
The `git stash create` command now supports the `--include-untracked` flag,
allowing users to include untracked files in the stash entry. This brings
parity with `git stash push`, which already supports this option.
Previously, `git stash create` would only stash tracked changes. With this
change, users can optionally include untracked files by specifying
`--include-untracked`. The implementation involves parsing the new option
in `create_stash` and passing it to `do_create_stash`, which handles the
creation of the stash entry.
The early check for tracked changes was removed to allow stashing when
only untracked files are present. Test cases were added to `t3903-stash.sh`
to ensure the correct behavior, and the documentation was updated
accordingly.1 parent 683c54c commit e33d91c
3 files changed
+66
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
147 | 149 | | |
148 | 150 | | |
149 | 151 | | |
| |||
170 | 172 | | |
171 | 173 | | |
172 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
113 | 118 | | |
114 | 119 | | |
115 | 120 | | |
| |||
1499 | 1504 | | |
1500 | 1505 | | |
1501 | 1506 | | |
1502 | | - | |
| 1507 | + | |
1503 | 1508 | | |
1504 | 1509 | | |
1505 | 1510 | | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
1506 | 1520 | | |
1507 | 1521 | | |
1508 | 1522 | | |
1509 | 1523 | | |
1510 | | - | |
1511 | | - | |
| 1524 | + | |
1512 | 1525 | | |
1513 | 1526 | | |
1514 | | - | |
1515 | | - | |
1516 | 1527 | | |
1517 | | - | |
| 1528 | + | |
1518 | 1529 | | |
1519 | 1530 | | |
1520 | 1531 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
635 | 676 | | |
636 | 677 | | |
637 | 678 | | |
| |||
0 commit comments