@@ -12,43 +12,50 @@ sections:
1212 " initOptions " : " #initOptions"
1313---
1414
15- ## <a name =" cherrypick " ></a ><span >Cherrypick.</span >cherrypick <span class =" tags " ><span class =" sync " >Sync</ span >< span class = " experimental " >Experimental </span ></span >
15+ ## <a name =" cherrypick " ></a ><span >Cherrypick.</span >cherrypick <span class =" tags " ><span class =" async " >Async </span ></span >
1616
1717``` js
18- var result = Cherrypick .cherrypick (repo, commit, cherrypick_options);
18+ Cherrypick .cherrypick (repo, commit, [options]).then (function (int ) {
19+ // Use int
20+ });
1921```
2022
23+ Cherrypick a commit and, changing the index and working directory
24+
2125| Parameters | Type | |
2226| --- | --- | --- |
23- | repo | [ Repository] ( /api/repository/ ) | the repository to cherry-pick |
24- | commit | [ Commit] ( /api/commit/ ) | the commit to cherry-pick |
25- | cherrypick_options | [ CherrypickOptions] ( /api/cherrypick_options/ ) | the cherry-pick options (or null for defaults) |
27+ | repo | [ Repository] ( /api/repository/ ) | The repo to checkout head |
28+ | commit | [ Commit] ( /api/commit/ ) | The commit to cherrypick |
29+ | [ options ] | [ CherrypickOptions] ( /api/cherrypick_options/ ) | Options for the cherrypick |
2630
2731| Returns | |
2832| --- | --- |
29- | Number | zero on success, -1 on failure. |
33+ | int | 0 on success, -1 on failure |
3034
31- ## <a name =" commit " ></a ><span >Cherrypick.</span >commit <span class =" tags " ><span class =" async " >Async</span ><span class = " experimental " >Experimental</ span >< /span >
35+ ## <a name =" commit " ></a ><span >Cherrypick.</span >commit <span class =" tags " ><span class =" async " >Async</span ></span >
3236
3337``` js
34- Cherrypick .commit (repo, cherrypick_commit, our_commit, mainline, merge_options).then (function (index ) {
35- // Use index
38+ Cherrypick .commit (repo, cherrypick_commit, our_commit, mainline, [ merge_options] ).then (function (int ) {
39+ // Use int
3640});
3741```
3842
43+ Cherrypicks the given commit against "our" commit, producing an index that
44+ reflects the result of the cherrypick. The index is not backed by a repo.
45+
3946| Parameters | Type | |
4047| --- | --- | --- |
41- | repo | [ Repository] ( /api/repository/ ) | the repository that contains the given commits |
42- | cherrypick_commit | [ Commit] ( /api/commit/ ) | the commit to cherry-pick |
43- | our_commit | [ Commit] ( /api/commit/ ) | the commit to revert against (eg, HEAD) |
44- | mainline | Number | the parent of the revert commit, if it is a merge |
45- | merge_options | [ MergeOptions] ( /api/merge_options/ ) | the merge options (or null for defaults) |
48+ | repo | [ Repository] ( /api/repository/ ) | The repo to cherrypick commits |
49+ | cherrypick_commit | [ Commit] ( /api/commit/ ) | The commit to cherrypick |
50+ | our_commit | [ Commit] ( /api/commit/ ) | The commit to revert against |
51+ | mainline | int | The parent of the revert commit (1 or 2) if it's a merge, 0 otherwise |
52+ | [ merge_options] | [ MergeOptions] ( /api/merge_options/ ) | Merge options for the cherrypick |
4653
4754| Returns | |
4855| --- | --- |
49- | [ Index ] ( /api/index/ ) | |
56+ | int | 0 on success, -1 on failure |
5057
51- ## <a name =" initOptions " ></a ><span >Cherrypick.</span >initOptions <span class =" tags " ><span class =" sync " >Sync</span ><span class = " experimental " >Experimental</ span >< /span >
58+ ## <a name =" initOptions " ></a ><span >Cherrypick.</span >initOptions <span class =" tags " ><span class =" sync " >Sync</span ></span >
5259
5360``` js
5461var result = Cherrypick .initOptions (opts, version);
0 commit comments