Re: [PATCH v3 1/3] pull --rebase: add --[no-]autostash flag

2016-03-04 Thread Paul Tan
On Fri, Mar 4, 2016 at 12:13 AM, Mehul Jain wrote: > diff --git a/builtin/pull.c b/builtin/pull.c > index 10eff03..b338b83 100644 > --- a/builtin/pull.c > +++ b/builtin/pull.c > @@ -85,6 +85,7 @@ static char *opt_squash; > static char *opt_commit; > static char

Re: [PATCH v3 1/3] pull --rebase: add --[no-]autostash flag

2016-03-03 Thread Matthieu Moy
Mehul Jain writes: > On Thu, Mar 3, 2016 at 10:54 PM, Matthieu Moy > wrote: >> Mehul Jain writes: >>> + else { >>> + /* If --[no-]autostash option is called without --rebase */ >>> +

Re: [PATCH v3 1/3] pull --rebase: add --[no-]autostash flag

2016-03-03 Thread Matthieu Moy
Eric Sunshine writes: > It would be reasonable to combine the two cases into one: > > if (opt_autostash != -1) > die(_("--[no]-autostash option is only valid with --rebase.")); Nit (in case Mehul copy/paste this): that would be --[no-], not --[no]-. --

Re: [PATCH v3 1/3] pull --rebase: add --[no-]autostash flag

2016-03-03 Thread Mehul Jain
On Thu, Mar 3, 2016 at 10:54 PM, Matthieu Moy wrote: > Mehul Jain writes: > >> 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

Re: [PATCH v3 1/3] pull --rebase: add --[no-]autostash flag

2016-03-03 Thread Eric Sunshine
On Thu, Mar 3, 2016 at 12:24 PM, Matthieu Moy wrote: > Mehul Jain writes: >> + else { >> + /* If --[no-]autostash option is called without --rebase */ >> + if (opt_autostash == 0) >> +

Re: [PATCH v3 1/3] pull --rebase: add --[no-]autostash flag

2016-03-03 Thread Matthieu Moy
Mehul Jain writes: > 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

[PATCH v3 1/3] pull --rebase: add --[no-]autostash flag

2016-03-03 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