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

2016-03-19 Thread Eric Sunshine
On Thu, Mar 17, 2016 at 4:17 AM, Mehul Jain wrote: > I tried out this approach and here's the result. > > + if(!opt_rebase && opt_autostash != -1) > + die(_("--[no-]autostash option is only valid with > --rebase.")); > + > if (opt_rebase) { > int autost

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

2016-03-19 Thread Mehul Jain
Hello Eric, I tried out this approach and here's the result. --- diff --git a/builtin/pull.c b/builtin/pull.c index b5b0255..0ce007d 100644 --- a/builtin/pull.c +++ b/builtin/pull.c @@ -86,6 +86,7 @@ static char *opt_commit; static char *opt_edit; static char *opt_ff; static char *opt_verify_

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

2016-03-18 Thread Eric Sunshine
On Wed, Mar 16, 2016 at 1:00 AM, Mehul Jain wrote: > On Wed, Mar 16, 2016 at 3:13 AM, Eric Sunshine > wrote: >>> +--autostash:: >>> +--no-autostash:: >>> + Before starting rebase, stash local modifications away (see >>> + linkgit:git-stash.txt[1]) if needed, and apply the stash when

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

2016-03-15 Thread Mehul Jain
On Wed, Mar 16, 2016 at 3:13 AM, Eric Sunshine wrote: >> diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt >> @@ -128,6 +128,15 @@ unless you have read linkgit:git-rebase[1] carefully. >> +--autostash:: >> +--no-autostash:: >> + Before starting rebase, stash local modifica

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

2016-03-15 Thread Eric Sunshine
On Tue, Mar 15, 2016 at 1:11 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 the current value of rebase

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

2016-03-15 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 --[no-]au