Commit 7512138
authored
Drop merge commits (#4094)
- **PR Description**
Allow deleting a merge commit. We only allow this when the merge commit
is the only selected item, and only outside of a rebase. The reason for
this is that we don't show the "label" and "reset" todos in lazygit, so
deleting a merge commit would leave the commits from the branch that is
being merged in the list as "pick" commits, with no indication that they
are going to be dropped because they are on a different branch, and the
merge commit that would have brought them in is gone. This could be very
confusing.
Fixes #3164.
- **Please check if the PR fulfills these requirements**
* [x] Cheatsheets are up-to-date (run `go generate ./...`)
* [x] Code has been formatted (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting))
* [x] Tests have been added/updated (see
[here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md)
for the integration test guide)
* [x] Text is internationalised (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation))
* [ ] If a new UserConfig entry was added, make sure it can be
hot-reloaded (see
[here](https://github.com/jesseduffield/lazygit/blob/master/docs/dev/Codebase_Guide.md#using-userconfig))
* [ ] Docs have been updated if necessary
* [x] You've read through your own file changes for silly mistakes etcFile tree
8 files changed
+194
-45
lines changed- pkg
- app/daemon
- commands/git_commands
- gui/controllers
- i18n
- integration/tests
- interactive_rebase
- utils
8 files changed
+194
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
235 | 236 | | |
236 | 237 | | |
237 | 238 | | |
238 | | - | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
247 | 271 | | |
248 | 272 | | |
249 | 273 | | |
| |||
296 | 320 | | |
297 | 321 | | |
298 | 322 | | |
299 | | - | |
300 | | - | |
| 323 | + | |
301 | 324 | | |
302 | 325 | | |
303 | 326 | | |
| |||
327 | 350 | | |
328 | 351 | | |
329 | 352 | | |
330 | | - | |
331 | | - | |
| 353 | + | |
332 | 354 | | |
333 | 355 | | |
334 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
327 | | - | |
| 327 | + | |
328 | 328 | | |
329 | | - | |
| 329 | + | |
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
339 | 338 | | |
340 | 339 | | |
341 | 340 | | |
| |||
565 | 564 | | |
566 | 565 | | |
567 | 566 | | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
568 | 574 | | |
569 | 575 | | |
570 | 576 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
| 500 | + | |
| 501 | + | |
500 | 502 | | |
501 | 503 | | |
502 | | - | |
| 504 | + | |
503 | 505 | | |
504 | 506 | | |
505 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
506 | 511 | | |
507 | 512 | | |
508 | 513 | | |
| |||
511 | 516 | | |
512 | 517 | | |
513 | 518 | | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
514 | 524 | | |
515 | 525 | | |
516 | 526 | | |
| |||
1358 | 1368 | | |
1359 | 1369 | | |
1360 | 1370 | | |
1361 | | - | |
| 1371 | + | |
1362 | 1372 | | |
1363 | 1373 | | |
1364 | 1374 | | |
1365 | 1375 | | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
1366 | 1380 | | |
1367 | 1381 | | |
1368 | 1382 | | |
| |||
1420 | 1434 | | |
1421 | 1435 | | |
1422 | 1436 | | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
1423 | 1441 | | |
1424 | 1442 | | |
1425 | 1443 | | |
| |||
1440 | 1458 | | |
1441 | 1459 | | |
1442 | 1460 | | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
1443 | 1465 | | |
1444 | 1466 | | |
1445 | 1467 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
| |||
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| 164 | + | |
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
| |||
320 | 322 | | |
321 | 323 | | |
322 | 324 | | |
| 325 | + | |
323 | 326 | | |
324 | 327 | | |
325 | 328 | | |
| |||
347 | 350 | | |
348 | 351 | | |
349 | 352 | | |
| 353 | + | |
350 | 354 | | |
351 | 355 | | |
352 | 356 | | |
| |||
1134 | 1138 | | |
1135 | 1139 | | |
1136 | 1140 | | |
| 1141 | + | |
1137 | 1142 | | |
1138 | 1143 | | |
1139 | 1144 | | |
| |||
1153 | 1158 | | |
1154 | 1159 | | |
1155 | 1160 | | |
| 1161 | + | |
1156 | 1162 | | |
1157 | 1163 | | |
1158 | 1164 | | |
| |||
1320 | 1326 | | |
1321 | 1327 | | |
1322 | 1328 | | |
| 1329 | + | |
1323 | 1330 | | |
1324 | 1331 | | |
1325 | 1332 | | |
| |||
1346 | 1353 | | |
1347 | 1354 | | |
1348 | 1355 | | |
| 1356 | + | |
1349 | 1357 | | |
1350 | 1358 | | |
1351 | 1359 | | |
| |||
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 15 | + | |
| 16 | + | |
19 | 17 | | |
20 | 18 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 19 | | |
25 | 20 | | |
26 | | - | |
27 | 21 | | |
28 | 22 | | |
29 | 23 | | |
| |||
40 | 34 | | |
41 | 35 | | |
42 | 36 | | |
43 | | - | |
| 37 | + | |
44 | 38 | | |
45 | 39 | | |
46 | 40 | | |
| |||
56 | 50 | | |
57 | 51 | | |
58 | 52 | | |
59 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
| 63 | + | |
| 64 | + | |
71 | 65 | | |
72 | 66 | | |
73 | 67 | | |
| |||
296 | 290 | | |
297 | 291 | | |
298 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
0 commit comments