threads / bug / 46269

Bug: Since Git 2.13.2 git rebase autostash doesn't use fast-forward (poor performance)

Subject: Bug: Since Git 2.13.2 git rebase autostash doesn't use fast-forward (poor performance)

## tl;dr

3 messages between Jun 27, 2017 and Jun 28, 2017.

replies: 2people: 2as markdown or json

neuling@dakosy.de· Jun 27, 2017, 14:34 UTC · lore
Hi, 

since the latest version 2.13.2 "git pull --rebase --autostash" doesn't use a fast forward if possible.

My global git config contains "pull.rebase=preserve" and "rebase.autostash=true". My working directory is clean with no changes.

When I use "git pull" git doesn't use a possible fast forward merge. If I remove "rebase.autostash" from my git config a fast forward merge will take place.

If a fast forward merge is possible and the working directory is clean autostash should do nothing and the fast forward merge should happen.

Is it also possible to implement autostash on fast forward merge that way to stash changes, do the fast forward merge and at least to apply the stashed changes?

Another problem is if "git pull rebase" without autostash can do a fast forward merge the rebase validation for changed files in my working directory will be done.

I think in that case the fast forward merge validation should run. That would prevent the need to stash local changes if they do not affect files of the commits to fast forward from origin branch.

Regards, Mattias

Junio C Hamano· Jun 27, 2017, 15:02 UTC · re: neuling@dakosy.de · lore

Re: Bug: Since Git 2.13.2 git rebase autostash doesn't use fast-forward (poor performance)

neuling@dakosy.de writes:
> since the latest version 2.13.2 "git pull --rebase --autostash" doesn't 
> use a fast forward if possible. 
This may not be a bug but instead a fix made deliberately.
cf. http://public-inbox.org/git/CAAZatrCaoB7EXVrCvC9RKmO02G5xcp8GPBaJefHfv7zAXVpL3Q@mail.gmail.com/
A deciding excerpt from the thread was:
> Correctness must trump optimizations

Patches to further update and resurrect the optimization without breaking correctness of course are of course very much welcomed.

Thanks.
neuling@dakosy.de· Jun 28, 2017, 08:22 UTC · re: Junio C Hamano · lore

Re: Bug: Since Git 2.13.2 git rebase autostash doesn't use fast-forward (poor performance)

Could you see this as suggestion for performance improvement or should I send another e-mail for a new task?

Regards, Mattias

Junio C Hamano <jch2355@gmail.com> schrieb am 27.06.2017 17:02:14:
Show 11 quoted lines
> Von: Junio C Hamano <gitster@pobox.com>
> An: neuling@dakosy.de
> Kopie: git@vger.kernel.org
> Datum: 27.06.2017 17:02
> Betreff: Re: Bug: Since Git 2.13.2 git rebase autostash doesn't use 
> fast-forward (poor performance)
> Gesendet von: Junio C Hamano <jch2355@gmail.com>
> 
> neuling@dakosy.de writes:
> 
> > since the latest version 2.13.2 "git pull --rebase --autostash" 
doesn't 
Show 15 quoted lines
> > use a fast forward if possible. 
> 
> This may not be a bug but instead a fix made deliberately.
> 
> cf. http://public-inbox.org/git/
> CAAZatrCaoB7EXVrCvC9RKmO02G5xcp8GPBaJefHfv7zAXVpL3Q@mail.gmail.com/
> 
> A deciding excerpt from the thread was:
> 
> > Correctness must trump optimizations
> 
> Patches to further update and resurrect the optimization without
> breaking correctness of course are of course very much welcomed.
> 
> Thanks.

← back to recent threads