diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-12-22 14:57:48 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-12-22 14:57:48 +0900 |
| commit | 24a51fef5b86ce9fc26a59436fc0e3a33d149d0b (patch) | |
| tree | 65cf5f8d0e288a8315203dfd4e6cd9b74ffda2af | |
| parent | 6a3051d3c200f0b40bf611338406af849de3d313 (diff) | |
| parent | a4a77e41fa0ee3d526993be47086bbfe3a115cdc (diff) | |
Merge branch 'rs/replay-wrong-onto-fix'
"git replay --onto=<commit> ...", when <commit> is mistyped,
started to segfault with recent change, which has been corrected.
* rs/replay-wrong-onto-fix:
replay: move onto NULL check before first use
| -rw-r--r-- | builtin/replay.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/replay.c b/builtin/replay.c index c71f5e6d94..69c4c55129 100644 --- a/builtin/replay.c +++ b/builtin/replay.c @@ -454,6 +454,9 @@ int cmd_replay(int argc, determine_replay_mode(repo, &revs.cmdline, onto_name, &advance_name, &onto, &update_refs); + if (!onto) /* FIXME: Should handle replaying down to root commit */ + die("Replaying down to root commit is not supported yet!"); + /* Build reflog message */ if (advance_name_opt) strbuf_addf(&reflog_msg, "replay --advance %s", advance_name_opt); @@ -472,9 +475,6 @@ int cmd_replay(int argc, } } - if (!onto) /* FIXME: Should handle replaying down to root commit */ - die("Replaying down to root commit is not supported yet!"); - if (prepare_revision_walk(&revs) < 0) { ret = error(_("error preparing revisions")); goto cleanup; |
