summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRamkumar Ramachandra <artagnon@gmail.com>2012-01-11 18:15:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-01-12 02:11:49 (GMT)
commit043a4492b3b7da6496617201c369cff6ab7c26f2 (patch)
tree3a61dc047a6f3420f9a3878ccc862424403fd344 /t
parent644a36908d6b52cb8c0c4d1ac69fd0b451e38f13 (diff)
downloadgit-043a4492b3b7da6496617201c369cff6ab7c26f2.zip
git-043a4492b3b7da6496617201c369cff6ab7c26f2.tar.gz
git-043a4492b3b7da6496617201c369cff6ab7c26f2.tar.bz2
sequencer: factor code out of revert builtin
Expose the cherry-picking machinery through a public sequencer_pick_revisions() (renamed from pick_revisions() in builtin/revert.c), so that cherry-picking and reverting are special cases of a general sequencer operation. The cherry-pick builtin is now a thin wrapper that does command-line argument parsing before calling into sequencer_pick_revisions(). In the future, we can write a new "foo" builtin that calls into the sequencer like: memset(&opts, 0, sizeof(opts)); opts.action = REPLAY_FOO; opts.revisions = xmalloc(sizeof(*opts.revs)); parse_args_populate_opts(argc, argv, &opts); init_revisions(opts.revs); sequencer_pick_revisions(&opts); This patch does not intend to make any functional changes. Check with: $ git blame -s -C HEAD^..HEAD -- sequencer.c | grep -C3 '^[^^]' Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
0 files changed, 0 insertions, 0 deletions