Re: [PATCH v7 2/2] pull --rebase: add --[no-]autostash flag

2016-03-11 Thread Mehul Jain
On Fri, Mar 11, 2016 at 10:21 AM, Paul Tan wrote: > Stepping back a bit, the only reason why we introduced opt_autostash = > -1 as a possible value is because we need to detect if > --[no-]autostash is being used with git-merge. I consider that a > kludge, because if git-merge

Re: [PATCH v7 2/2] pull --rebase: add --[no-]autostash flag

2016-03-11 Thread Mehul Jain
On Fri, Mar 11, 2016 at 7:00 PM, Matthieu Moy wrote: > What Junio says is that you don't need to write > > static int config_autostash = 0; > > since it is equivalent to > > static int config_autostash; > > But there's nothing wrong with having a static variable

Re: [PATCH v7 2/2] pull --rebase: add --[no-]autostash flag

2016-03-11 Thread Matthieu Moy
Mehul Jain writes: > On Fri, Mar 11, 2016 at 10:21 AM, Paul Tan wrote: >>> static int config_autostash = -1; >> >> Hmm, why can't config_autostash just default to 0? > > Previously Junio recommended not to explicitly initialize a > static to 0 (or

Re: [PATCH v7 2/2] pull --rebase: add --[no-]autostash flag

2016-03-11 Thread Mehul Jain
On Fri, Mar 11, 2016 at 10:21 AM, Paul Tan wrote: >> static int config_autostash = -1; > > Hmm, why can't config_autostash just default to 0? Previously Junio recommended not to explicitly initialize a static to 0 (or NULL).

Re: [PATCH v7 2/2] pull --rebase: add --[no-]autostash flag

2016-03-10 Thread Paul Tan
On Wed, Mar 9, 2016 at 12:18 PM, Mehul Jain wrote: > If rebase.autoStash configuration variable is set, there is no way to > override it for "git pull --rebase" from the command line. > > Teach "git pull --rebase" the --[no-]autostash command line flag which > overrides

[PATCH v7 2/2] pull --rebase: add --[no-]autostash flag

2016-03-08 Thread Mehul Jain
If rebase.autoStash configuration variable is set, there is no way to override it for "git pull --rebase" from the command line. Teach "git pull --rebase" the --[no-]autostash command line flag which overrides the current value of rebase.autoStash, if set. As "git rebase" understands the