Re: Regression in 'git branch -m'?

2017-10-06 Thread Junio C Hamano
Jeff King writes: > Earlier I blamed Duy's 31824d180d. And that is the start of the > regression in v2.15, but only because it fixed another bug which was > papering over the one I'm fixing here. :) I haven't read Michael's reply, but 2/2 is very well explained and looks correct.

Re: Regression in 'git branch -m'?

2017-10-06 Thread Jeff King
On Thu, Oct 05, 2017 at 07:25:52PM +0200, Andreas Krey wrote: > I got something that looks like a regression somewhere since 2.11. > This script > > set -xe > rm -rf repo > git init repo > cd repo > git commit -m nix --allow-empty > git branch -m master/master > git rev-parse HEAD

Re: Regression in 'git branch -m'?

2017-10-06 Thread Jeff King
On Fri, Oct 06, 2017 at 06:45:08PM +0900, Junio C Hamano wrote: > Jeff King writes: > > > So this patch fixes the problem: > > > > diff --git a/refs.c b/refs.c > > index df075fcd06..2ba74720c8 100644 > > --- a/refs.c > > +++ b/refs.c > > @@ -1435,7 +1435,8 @@ const char

Re: Regression in 'git branch -m'?

2017-10-06 Thread Junio C Hamano
Jeff King writes: > So this patch fixes the problem: > > diff --git a/refs.c b/refs.c > index df075fcd06..2ba74720c8 100644 > --- a/refs.c > +++ b/refs.c > @@ -1435,7 +1435,8 @@ const char *refs_resolve_ref_unsafe(struct ref_store > *refs, > if

Re: Regression in 'git branch -m'?

2017-10-06 Thread Jeff King
On Fri, Oct 06, 2017 at 03:39:13AM -0400, Jeff King wrote: > I got a chance to look at this again. I think the root of the problem is > that resolve_ref() as it is implemented now is just totally unsuitable > for asking the question "what does this symbolic link point to?". > > Because you end

Re: Regression in 'git branch -m'?

2017-10-06 Thread Jeff King
On Thu, Oct 05, 2017 at 02:33:03PM -0400, Jeff King wrote: > Looks like 31824d180d (branch: fix branch renaming not updating HEADs > correctly, 2017-08-24). This is in v2.15.0-rc0, so we should figure it > out before the upcoming release. > > I didn't dig very far, but it looks like the branch

Re: Regression in 'git branch -m'?

2017-10-05 Thread Jeff King
On Thu, Oct 05, 2017 at 07:25:52PM +0200, Andreas Krey wrote: > I got something that looks like a regression somewhere since 2.11. > This script > > set -xe > rm -rf repo > git init repo > cd repo > git commit -m nix --allow-empty > git branch -m master/master > git rev-parse HEAD

Regression in 'git branch -m'?

2017-10-05 Thread Andreas Krey
Hi everybody, I got something that looks like a regression somewhere since 2.11. This script set -xe rm -rf repo git init repo cd repo git commit -m nix --allow-empty git branch -m master/master git rev-parse HEAD git branch git status causes .git/HEAD to still contain 'ref: