git rebase -i: add static check for commands and SHA-1
authorGalan Rémi <remi.galan-alfonso@ensimag.grenoble-inp.fr>
Mon, 29 Jun 2015 20:20:32 +0000 (22:20 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Jun 2015 19:14:25 +0000 (12:14 -0700)
Check before the start of the rebasing if the commands exists, and for
the commands expecting a SHA-1, check if the SHA-1 is present and
corresponds to a commit. In case of error, print the error, stop git
rebase and prompt the user to fix with 'git rebase --edit-todo' or to
abort.

This allows to avoid doing half of a rebase before finding an error
and giving back what's left of the todo list to the user and prompt
him to fix when it might be too late for him to do so (he might have
to abort and restart the rebase).

Signed-off-by: Galan Rémi <remi.galan-alfonso@ensimag.grenoble-inp.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found