Repository navigation
Commit 5bf518c
committed
Unstage selected lines of a staged addition as a modification of the index entry
A partial selection on a creation diff leaves other lines in place, and
git refuses to reverse part of a creation patch ("new file depends on
old contents"). For line operations, rewrite the header as a
modification of the same path with the old side starting at line 1, so
the selected lines are removed from the index entry and nothing else
moves. Selecting every line keeps the creation header so the entry is
removed outright, the same as the hunk-level button.1 parent 8fa0a35 commit 5bf518c
1 file changed
Lines changed: 24 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
385 | 396 | | |
386 | 397 | | |
387 | 398 | | |
388 | 399 | | |
389 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
390 | 413 | | |
391 | 414 | | |
392 | 415 | | |
| |||
0 commit comments