That is perfectly fine! If you can do a manual merge, I would really
appreciate. I'm currently out of town. I really would appreciate it! :)
thanks!!
On Apr 19, 2014 10:15 AM, "Julian Aubourg" <notifications@github.com> wrote:

> In lib/task.js:
>
> >
> >  		runner.exec( "git submodule", function( result ) {
> >
> >  			var merge =  /(?:^|\n)-/.test( result.stdout ) ? "" : " --merge";
> > -
> > -			runner.exec( "git submodule update --init --recursive" + merge, runner.ok );
> > +			var params;
> > +			if (options.gitArgs === undefined) {
> > +				params = " --init --recursive" + merge;
> > +			} else if (options.gitArgs === null) {
> > +				params = "";
> > +			} else {
> > +				params = " " + options.gitArgs;
> > +			}
> > +
> > +			runner.exec( "git submodule update" + params, runner.ok );
>
> This seems quite convoluted to me. How about something like this;
>
> var gitArgs = options.hasOwnProperty( "gitArgs" ) ? options.gitArgs || "" : "--init --recursive" + merge;runner.exec( "git submodule update " + gitArgs );
>
> That way:
>
>    - if you don't have a gitArgs option, default is used,
>    - if you do have a falsy gitArgs option (false -- obvious favorite for
>    documentation --, "", null, undefined), pure git submodule update
>    - if you do have a non falsy gitArgs, it's used as the command line
>    arguments
>
> What do you think?
>
> Oh, also, why naming this variable params when those actually are gitArgs?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/jaubourg/grunt-update-submodules/pull/5/files#r11791949>
> .
>