diff options
author | Ramkumar Ramachandra <artagnon@gmail.com> | 2011-08-04 16:09:10 +0530 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-04 15:40:45 -0700 |
commit | 21b14778a9b033d80b3e5757d9576da13ba446cd (patch) | |
tree | 84084078e031b9f6ff1b695a0a3ec69e3bfe08cc /Documentation/RelNotes | |
parent | revert: Save command-line options for continuing operation (diff) | |
download | tgif-21b14778a9b033d80b3e5757d9576da13ba446cd.tar.xz |
revert: Make pick_commits functionally act on a commit list
Apart from its central objective of calling into the picking
mechanism, pick_commits creates a sequencer directory, prepares a todo
list, and even acts upon the "--reset" subcommand. This makes for a
bad API since the central worry of callers is to figure out whether or
not any conflicts were encountered during the cherry picking. The
current API is like:
if (pick_commits(opts) < 0)
print "Something failed, we're not sure what"
So, change pick_commits so that it's only responsible for picking
commits in a loop and reporting any errors, leaving the rest to a new
function called pick_revisions. Consequently, the API of pick_commits
becomes much clearer:
act_on_subcommand(opts->subcommand);
todo_list = prepare_todo_list();
if (pick_commits(todo_list, opts) < 0)
print "Error encountered while picking commits"
Now, callers can easily call-in to the cherry-picking machinery by
constructing an arbitrary todo list along with some options.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/RelNotes')
0 files changed, 0 insertions, 0 deletions