summaryrefslogtreecommitdiff
path: root/sequencer.h
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2011-08-04 10:39:10 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-08-04 22:40:45 (GMT)
commit21b14778a9b033d80b3e5757d9576da13ba446cd (patch)
tree84084078e031b9f6ff1b695a0a3ec69e3bfe08cc /sequencer.h
parent6f0322633b2659d26d1c7b20d4af1fba33978690 (diff)
downloadgit-21b14778a9b033d80b3e5757d9576da13ba446cd.zip
git-21b14778a9b033d80b3e5757d9576da13ba446cd.tar.gz
git-21b14778a9b033d80b3e5757d9576da13ba446cd.tar.bz2
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 'sequencer.h')
0 files changed, 0 insertions, 0 deletions