revert: allow cherry-picking more than one commit
commit7e2bfd3f99f8d6e89c7b855675919dd5404e47a2
authorChristian Couder <chriscool@tuxfamily.org>
Wed, 2 Jun 2010 05:58:38 +0000 (2 07:58 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Jun 2010 17:09:56 +0000 (2 10:09 -0700)
treed462af0e31a5ffc87eb4c5f2a2d9206da14a5e23
parent4b2095622f61e6ab51f03601e5c3c8d71ace5fc7
revert: allow cherry-picking more than one commit

This makes it possible to pass many commits or ranges of
commits to "git cherry-pick" and to "git revert" to process
many commits instead of just one.

In fact commits are now enumerated with an equivalent of

git rev-list --no-walk "$@"

so all the following are now possible:

git cherry-pick master~2..master
git cherry-pick ^master~2 master
git cherry-pick master^ master

The following should be possible but does not work:

git cherry-pick -2 master

because "git rev-list --no-walk -2 master" only outputs
one commit as "--no-walk" seems to take over "-2".

And there is currently no way to continue cherry-picking or
reverting if there is a problem with one commit. It's also
not possible to abort the whole process. Some future work
should provide the --continue and --abort options to do
just that.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/revert.c