Skip to content

Commit 24a51fe

Browse files
committed
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
2 parents 6a3051d + a4a77e4 commit 24a51fe

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

builtin/replay.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,9 @@ int cmd_replay(int argc,
454454
determine_replay_mode(repo, &revs.cmdline, onto_name, &advance_name,
455455
&onto, &update_refs);
456456

457+
if (!onto) /* FIXME: Should handle replaying down to root commit */
458+
die("Replaying down to root commit is not supported yet!");
459+
457460
/* Build reflog message */
458461
if (advance_name_opt)
459462
strbuf_addf(&reflog_msg, "replay --advance %s", advance_name_opt);
@@ -472,9 +475,6 @@ int cmd_replay(int argc,
472475
}
473476
}
474477

475-
if (!onto) /* FIXME: Should handle replaying down to root commit */
476-
die("Replaying down to root commit is not supported yet!");
477-
478478
if (prepare_revision_walk(&revs) < 0) {
479479
ret = error(_("error preparing revisions"));
480480
goto cleanup;

0 commit comments

Comments
 (0)