Re: [PATCH 1/3] rebase: teach rebase --keep-base

2019-04-01 Thread Junio C Hamano
Denton Liu writes: >> > I never use the "feature" myself, but I recall that when "git >> > rebase" is run on a branch appropriately prepared, you do not even >> > have to say (iow, you type "git rebase" and rebase >> > on top of @{upstream}). >> > >> > Can this new "--keep-base" feature mesh

Re: [PATCH 1/3] rebase: teach rebase --keep-base

2019-03-26 Thread Johannes Schindelin
Hi Denton, On Mon, 25 Mar 2019, Denton Liu wrote: > On Mon, Mar 25, 2019 at 07:50:38PM +0100, Johannes Schindelin wrote: > > > P.S.: Did you run the test suite before submitting your patches? > > Usually I'm more diligent about running tests but I wrote this patchset > in the back of a car when I

Re: [PATCH 1/3] rebase: teach rebase --keep-base

2019-03-25 Thread Denton Liu
Hi Johannes, On Mon, Mar 25, 2019 at 07:50:38PM +0100, Johannes Schindelin wrote: > Hi Denton, > > On Sat, 23 Mar 2019, Denton Liu wrote: > > > [...] > > > > This allows us to rewrite the above as > > > > git rebase -i --keep-base master > > > > and > > > > git rebase -x ./test.sh --keep

Re: [PATCH 1/3] rebase: teach rebase --keep-base

2019-03-25 Thread Johannes Schindelin
Hi Denton, On Sat, 23 Mar 2019, Denton Liu wrote: > [...] > > This allows us to rewrite the above as > > git rebase -i --keep-base master > > and > > git rebase -x ./test.sh --keep-base master > > respectively. Just a quick note: this breaks t5407 because that test uses `git rebase -

Re: [PATCH 1/3] rebase: teach rebase --keep-base

2019-03-24 Thread Denton Liu
On Sat, Mar 23, 2019 at 08:25:28AM -0700, Denton Liu wrote: > A common scenario is if a user is working on a topic branch and they > wish to make some changes to intermediate commits or autosquashing, they Sorry, small typo here: s/autosquashing/autosquash/ -Denton > would run something such as

Re: [PATCH 1/3] rebase: teach rebase --keep-base

2019-03-24 Thread Denton Liu
On Sun, Mar 24, 2019 at 05:06:18PM -0700, Denton Liu wrote: > Hi Junio, > > On Sun, Mar 24, 2019 at 10:20:28PM +0900, Junio C Hamano wrote: > > Denton Liu writes: > > > > > A common scenario is if a user is working on a topic branch and they > > > wish to make some changes to intermediate commit

Re: [PATCH 1/3] rebase: teach rebase --keep-base

2019-03-24 Thread Denton Liu
Hi Junio, On Sun, Mar 24, 2019 at 10:20:28PM +0900, Junio C Hamano wrote: > Denton Liu writes: > > > A common scenario is if a user is working on a topic branch and they > > wish to make some changes to intermediate commits or autosquashing, they > > would run something such as > > > > git r

Re: [PATCH 1/3] rebase: teach rebase --keep-base

2019-03-24 Thread Junio C Hamano
Denton Liu writes: > if (strstr(options.onto_name, "...")) { > if (get_oid_mb(options.onto_name, &merge_base) < 0) > + if (keep_base) > + die(_("'%s': need exactly one merge base with branch"), > + options.upstrea

Re: [PATCH 1/3] rebase: teach rebase --keep-base

2019-03-24 Thread Junio C Hamano
Denton Liu writes: > A common scenario is if a user is working on a topic branch and they > wish to make some changes to intermediate commits or autosquashing, they > would run something such as > > git rebase -i --onto master... master > > in order to preserve the merge base. This prevents

Re: [PATCH 1/3] rebase: teach rebase --keep-base

2019-03-23 Thread Eric Sunshine
On Sat, Mar 23, 2019 at 11:25 AM Denton Liu wrote:> > [...] > Since rebasing onto the merge base of the branch and the upstream is > such a common case, introduce the --keep-base option as a shortcut. > [...] > Signed-off-by: Denton Liu > --- > diff --git a/builtin/rebase.c b/builtin/rebase.c > @

[PATCH 1/3] rebase: teach rebase --keep-base

2019-03-23 Thread Denton Liu
A common scenario is if a user is working on a topic branch and they wish to make some changes to intermediate commits or autosquashing, they would run something such as git rebase -i --onto master... master in order to preserve the merge base. This prevents unnecessary commit churning.