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

3 messages from 2017-06-27 to 2017-06-28. Participants: neuling@dakosy.de, Junio C Hamano.
Thread: https://gitlist.dev/t/46269

## neuling@dakosy.de, 2017-06-27 14:34

Subject: Bug: Since Git 2.13.2 git rebase autostash doesn't use fast-forward (poor performance)
Message-ID: <OF6AC13578.F02B79FA-ONC125814C.004DD247-C125814C.00500A93@dakosy.de>
URL: https://gitlist.dev/e/OF6AC13578.F02B79FA-ONC125814C.004DD247-C125814C.00500A93%40dakosy.de

```
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, 2017-06-27 15:02

Subject: Re: Bug: Since Git 2.13.2 git rebase autostash doesn't use fast-forward (poor performance)
Message-ID: <xmqqvanh324p.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqvanh324p.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <OF6AC13578.F02B79FA-ONC125814C.004DD247-C125814C.00500A93@dakosy.de>

```
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, 2017-06-28 08:22

Subject: Re: Bug: Since Git 2.13.2 git rebase autostash doesn't use fast-forward (poor performance)
Message-ID: <OF99731898.CA1C41BB-ONC125814D.002E02EC-C125814D.002E0B32@dakosy.de>
URL: https://gitlist.dev/e/OF99731898.CA1C41BB-ONC125814D.002E02EC-C125814D.002E0B32%40dakosy.de
In-Reply-To: <xmqqvanh324p.fsf@gitster.mtv.corp.google.com>

```
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:

> 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 
> > 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.


```
