Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions lib/repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,13 +455,16 @@ Repository.prototype.checkoutRef = function(reference, opts) {
* promise, finish() will be called when the
* promise resolves. This callback will be
* provided a detailed overview of the rebase
* @param {RebaseOptions} rebaseOptions Options to initialize the rebase object
* with
* @return {Oid|Index} A commit id for a succesful merge or an index for a
* rebase with conflicts
*/
Repository.prototype.continueRebase = function(
signature,
beforeNextFn,
beforeFinishFn
beforeFinishFn,
rebaseOptions
) {
var repo = this;

Expand All @@ -474,16 +477,22 @@ Repository.prototype.continueRebase = function(
throw index;
}

return NodeGit.Rebase.open(repo);
return NodeGit.Rebase.open(repo, rebaseOptions);
})
.then(function(_rebase) {
rebase = _rebase;
return rebase.commit(null, signature)
.catch(function() {
.catch(function(e) {
// Ignore all errors to prevent
// this routine from choking now
// that we made rebase.commit
// asynchronous
const errorno = fp.get(["errorno"], e);
if (errorno === NodeGit.Error.CODE.EAPPLIED) {
return;
}

throw e;
});
})
.then(function() {
Expand Down Expand Up @@ -1505,6 +1514,8 @@ Repository.prototype.isReverting = function() {
* promise, finish() will be called when the
* promise resolves. This callback will be
* provided a detailed overview of the rebase
* @param {RebaseOptions} rebaseOptions Options to initialize the rebase object
* with
* @return {Oid|Index} A commit id for a succesful merge or an index for a
* rebase with conflicts
*/
Expand Down