Skip to content
Permalink
Browse files

Fix rebase deduction logic in pull.

I think there must have been a change in the way argparse handles
defaults, and where previously we were getting an `undefined` we are now
getting a `null`.
  • Loading branch information...
bpeabody committed Mar 6, 2019
1 parent fb43980 commit f56a670be2844282ea09ad4f8496dbd1e96f5e22
Showing with 5 additions and 1 deletion.
  1. +1 −1 node/lib/util/pull.js
  2. +4 −0 node/test/util/pull.js
@@ -100,7 +100,7 @@ ${colors.red(source)} in the remote ${colors.yellow(remoteName)}.`);
* @return bool
*/
exports.userWantsRebase = co.wrap(function*(args, repo, branch) {
if (args.rebase !== undefined) {
if (args.rebase !== undefined && args.rebase !== null) {
return args.rebase;
}

@@ -132,6 +132,10 @@ describe("userWantsRebase", function () {
null,
null));

assert.equal(false, yield Pull.userWantsRebase({"rebase": null},
repo,
master));

assert.equal(false, yield Pull.userWantsRebase({},
repo,
master));

0 comments on commit f56a670

Please sign in to comment.
You can’t perform that action at this time.