Skip to content
8 changes: 6 additions & 2 deletions lib/repository.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,13 @@ Repository.prototype.continueRebase = function(
})
.then(function(_rebase) {
rebase = _rebase;
return rebase.commit(null, signature);
return rebase.commit(null, signature)
.catch(function() {
// we are ignoring errors. This is to prevent issues caused by making this async

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are these errors that we are supposedly ignoring?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of them. The original synchronous method would ignore the libgit2 result and just return the Oid. We ran into issues with this change when rebasing as the EAPPLIED error is sometimes thrown when a patch is already applied. Because we switched to the asynchronous pattern the code now throws instead of returning a null Oid. This caused rebase operations to halt when trying to continue rebase in some scenarios.

return 0;
});
})
.then(function(oid) {
.then(function() {
return performRebase(
repo,
rebase,
Expand Down