cherry-pick: make sure all input objects are commits
commit21246dbb9e0af278bc671e32e45a6cae4ad38b6f
authorMiklos Vajna <vmiklos@suse.cz>
Thu, 11 Apr 2013 13:06:52 +0000 (11 15:06 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Apr 2013 16:54:25 +0000 (11 09:54 -0700)
tree189bf00464a90b6bbd13efa2a186faccb17fe904
parentfa7285dc3dce8bd01fd8c665b032603ed55348e5
cherry-pick: make sure all input objects are commits

When a single argument was a non-commit, the error message used to be:

fatal: BUG: expected exactly one commit from walk

For multiple arguments, when none of the arguments was a commit, the error was:

fatal: empty commit set passed

Finally, when some of the arguments were non-commits, we ignored those
arguments.  Fix this bug and make sure all arguments are commits, and
for the first non-commit, error out with:

fatal: <name>: Can't cherry-pick a <type>

Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
t/t3508-cherry-pick-many-commits.sh