Commit fdc97ab
committed
git add <pathspec>... defaults to "-A"
Make "git add <pathspec>..." notice paths that have been removed
from the working tree, i.e. the same as "git add -A <pathspec>...".
Given that "git add <pathspec>" is to update the index with the
state of the named part of the working tree as a whole, it makes it
more intuitive, and also makes it possible to simplify the advice we
give while marking the paths the user finished resolving conflicts
with. We used to say "to record removal as a resolution, remove the
path from the working tree and say 'git rm'; for all other cases,
edit the path in the working tree and say 'git add'", but we can now
say "update the path in the working tree and say 'git add'" instead.
As promised, this merges the temporary update_files_in_cache() helper
function back to add_files_to_cache() function.
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 4c71143 commit fdc97ab
2 files changed
Lines changed: 15 additions & 46 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
57 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
58 | 64 | | |
59 | 65 | | |
60 | 66 | | |
| |||
129 | 135 | | |
130 | 136 | | |
131 | 137 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
| |||
96 | 93 | | |
97 | 94 | | |
98 | 95 | | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | 96 | | |
118 | 97 | | |
119 | 98 | | |
| |||
151 | 130 | | |
152 | 131 | | |
153 | 132 | | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | 133 | | |
159 | 134 | | |
160 | 135 | | |
| |||
378 | 353 | | |
379 | 354 | | |
380 | 355 | | |
381 | | - | |
| 356 | + | |
382 | 357 | | |
383 | 358 | | |
384 | 359 | | |
| |||
476 | 451 | | |
477 | 452 | | |
478 | 453 | | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | 454 | | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
| 455 | + | |
| 456 | + | |
493 | 457 | | |
494 | 458 | | |
495 | 459 | | |
| |||
579 | 543 | | |
580 | 544 | | |
581 | 545 | | |
| 546 | + | |
582 | 547 | | |
583 | 548 | | |
584 | 549 | | |
| |||
0 commit comments