Commit a4a77e4
replay: move onto NULL check before first use
cmd_replay() aborts if the pointer "onto" is NULL after argument
parsing, e.g. when specifying a non-existing commit with --onto.
15cd4ef (replay: make atomic ref updates the default behavior,
2025-11-06) added code that dereferences this pointer before the check.
Switch their places to avoid a segmentation fault.
Reported-by: Kristoffer Haugsbakk <kristofferhaugsbakk@fastmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 8cb4a11 commit a4a77e4
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
457 | 460 | | |
458 | 461 | | |
459 | 462 | | |
| |||
472 | 475 | | |
473 | 476 | | |
474 | 477 | | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
| |||
0 commit comments