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

2016-02-28 Thread Junio C Hamano
Paul Tan writes: > Ultimately, git-pull needs to be aware of whether autostash is active > or not (and this means rebase.autostash needs to be looked at as well) > because if autostash is disabled, git-pull needs to perform the > "worktree is clean" check. And this "worktree

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

2016-02-28 Thread Paul Tan
Hi Junio, On Sun, Feb 28, 2016 at 3:26 AM, Junio C Hamano wrote: > Mehul Jain writes: >> @@ -835,13 +841,10 @@ int cmd_pull(int argc, const char **argv, const char >> *prefix) >> hashclr(orig_head); >> >> if (opt_rebase) { >> -

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

2016-02-28 Thread Matthieu Moy
Mehul Jain writes: > If user uses "git pull --[no-]autostash" then two possible things can be done: > >* Either "git pull" ignores "--[no-]autostash" and calls > underlying "git merge", > as merge stashes the untracked files by

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

2016-02-28 Thread Mehul Jain
On Sun, Feb 28, 2016 at 12:56 AM, Junio C Hamano wrote: > Mehul Jain writes: > >> git pull --rebase understands --[no-]autostash flag. >> >> This flag overrides config variable "rebase.autoStash" >> if set (default is false). > > Is that a statement

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

2016-02-27 Thread Junio C Hamano
Mehul Jain writes: > git pull --rebase understands --[no-]autostash flag. > > This flag overrides config variable "rebase.autoStash" > if set (default is false). Is that a statement of a fact? If so, is it true before this patch is applied, or after? Each project

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

2016-02-27 Thread Mehul Jain
git pull --rebase understands --[no-]autostash flag. This flag overrides config variable "rebase.autoStash" if set (default is false). When calling "git pull --rebase" with "--autostash", pull passes the "--autostash" option to rebase, which then runs rebase on a dirty worktree. With