From 7f13334e074bb053eccd14787e416306bc4b413a Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Sat, 13 Aug 2011 12:06:23 -0500 Subject: revert: pass around rev-list args in already-parsed form Since 7e2bfd3f (revert: allow cherry-picking more than one commit, 2010-07-02), the pick/revert machinery has kept track of the set of commits to be cherry-picked or reverted using commit_argc and commit_argv variables, storing the corresponding command-line parameters. Future callers as other commands are built in (am, rebase, sequencer) may find it easier to pass rev-list options to this machinery in already-parsed form. Teach cmd_cherry_pick and cmd_revert to parse the rev-list arguments in advance and pass the commit set to pick_revisions() as a rev_info structure. Original patch by Jonathan, tweaks and test from Ram. Signed-off-by: Jonathan Nieder Improved-by: Ramkumar Ramachandra Signed-off-by: Junio C Hamano --- t/t3510-cherry-pick-sequence.sh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 't/t3510-cherry-pick-sequence.sh') diff --git a/t/t3510-cherry-pick-sequence.sh b/t/t3510-cherry-pick-sequence.sh index 4d1883b734..56c95ec18c 100755 --- a/t/t3510-cherry-pick-sequence.sh +++ b/t/t3510-cherry-pick-sequence.sh @@ -461,4 +461,9 @@ test_expect_success 'malformed instruction sheet 2' ' test_must_fail git cherry-pick --continue ' +test_expect_success 'empty commit set' ' + pristine_detach initial && + test_expect_code 128 git cherry-pick base..base +' + test_done -- cgit v1.2.1