grunt-git
grunt-git copied to clipboard
Feature pull rebase
Add the pull --rebase option.
Per git pull docs, you can set the rebase option to true or preserve.
Also requested here: https://github.com/rubenv/grunt-git/issues/78
Thanks @AoDev
Just to be sure that no one accidentally changes your === to == in the future, I suggest adding the following test:
it('should refuse --rebase option with invalid value', function (done) {
var options = {
branch: 'master',
rebase: 'true'
};
new Test(command, options)
.expect(['pull', 'origin', 'master'])
.run(done);
});
Let me know what you think.
In fact, it may be prudent to throw an exception inside your customFlagFn if the value of rebase is not true or "preserve", rather than returning a falsy.