mirror of
https://github.com/git/git.git
synced 2026-01-11 13:23:12 +09:00
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
This commit is contained in:
commit
24a51fef5b
@ -454,6 +454,9 @@ int cmd_replay(int argc,
|
|||||||
determine_replay_mode(repo, &revs.cmdline, onto_name, &advance_name,
|
determine_replay_mode(repo, &revs.cmdline, onto_name, &advance_name,
|
||||||
&onto, &update_refs);
|
&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 */
|
/* Build reflog message */
|
||||||
if (advance_name_opt)
|
if (advance_name_opt)
|
||||||
strbuf_addf(&reflog_msg, "replay --advance %s", 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) {
|
if (prepare_revision_walk(&revs) < 0) {
|
||||||
ret = error(_("error preparing revisions"));
|
ret = error(_("error preparing revisions"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user