Commit 3be7c73
committed
add -p: mark split hunks as undecided
When a hunk is split each of the new hunks inherits whether it is
selected or not from the original hunk. If a selected hunk is split
all of the new hunks are selected and the user is only prompted with
the first of the split hunks, they are not asked whether or not they
want to select the rest of the new hunks. If they want to deselect
one of the other new hunks they have to navigate back to it to do
that. This is unfortunate as the user is presumably splitting the
original hunk because they only want to select some sub-set of it.
Instead mark all the new hunks as "undecided" so that we prompt the
user to decide whether to select them or not. In the case where the
user only wants to change the selection of the first of the split
hunks they will now have to do more work re-selecting the remaining
split hunks. However changing the selection of any of the other newly
created hunks is now much simpler as the user no-longer has to navigate
back to them before being able to change their selected state. Due
to concerns that users may be relying on the current behaviour [1]
this change is guarded by WITH_BREAKING_CHANGES.
[1] https://lore.kernel.org/git/[email protected]
Signed-off-by: Phillip Wood <[email protected]>1 parent 038143d commit 3be7c73
File tree
3 files changed
+22
-0
lines changed- Documentation
- t
3 files changed
+22
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
956 | 959 | | |
957 | 960 | | |
958 | 961 | | |
| |||
1054 | 1057 | | |
1055 | 1058 | | |
1056 | 1059 | | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
1057 | 1063 | | |
| 1064 | + | |
1058 | 1065 | | |
1059 | 1066 | | |
1060 | 1067 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1230 | 1230 | | |
1231 | 1231 | | |
1232 | 1232 | | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
1233 | 1243 | | |
0 commit comments