rebase -i: suggest using --edit-todo to fix an unknown instruction

We have now an explicit UI to edit the todo sheet and need not disclose
the name of the file.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Johannes Sixt 2012-09-19 08:43:54 +02:00 committed by Junio C Hamano
parent 9f4981bac6
commit 9c8e1011b9

View file

@ -575,11 +575,12 @@ do_next () {
;;
*)
warn "Unknown command: $command $sha1 $rest"
fixtodo="Please fix this using 'git rebase --edit-todo'."
if git rev-parse --verify -q "$sha1" >/dev/null
then
die_with_patch $sha1 "Please fix this in the file $todo."
die_with_patch $sha1 "$fixtodo"
else
die "Please fix this in the file $todo."
die "$fixtodo"
fi
;;
esac