grunt-git icon indicating copy to clipboard operation
grunt-git copied to clipboard

Feature pull rebase

Open AoDev opened this issue 11 years ago • 2 comments

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

AoDev avatar Oct 16 '14 09:10 AoDev

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.

dylancwood avatar Oct 23 '14 17:10 dylancwood

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.

dylancwood avatar Oct 23 '14 17:10 dylancwood