threads / discuss / 29578

Merging tags does not fast-forward with git 1.7.9

Subject: Merging tags does not fast-forward with git 1.7.9

## tl;dr

7 messages between Feb 9, 2012 and Feb 9, 2012.

replies: 6people: 5as markdown or json

Domenico Andreoli· Feb 9, 2012, 09:54 UTC · lore
Hi,
  with the recent changes in tag merging (I updated git to 1.7.9),
my usual "git merge v3.X-rcY" command does not fast-forward any more.
Of course the initial head is something like "v3.X-rcZ" without any
change so that it should (and usually did) fast-forward to the new head.

The editor is instead fired off and I have to fill the details of a merge commit, diverging from mainline as soon as I save and exit.

Is there any simple and clear explanation for this? Thank you.

cheers, Domenico

ps: I admit I didn't follow the details about tag signatures so probably I missed something that I shouldn't.

Dan Johnson· Feb 9, 2012, 15:50 UTC · re: Domenico Andreoli · lore

Re: Merging tags does not fast-forward with git 1.7.9

On Thu, Feb 9, 2012 at 4:54 AM, Domenico Andreoli <cavokz@gmail.com> wrote:
Show 11 quoted lines
> Hi,
>
>  with the recent changes in tag merging (I updated git to 1.7.9),
> my usual "git merge v3.X-rcY" command does not fast-forward any more.
> Of course the initial head is something like "v3.X-rcZ" without any
> change so that it should (and usually did) fast-forward to the new head.
>
> The editor is instead fired off and I have to fill the details of a
> merge commit, diverging from mainline as soon as I save and exit.
>
> Is there any simple and clear explanation for this? Thank you.

Someone else can explain what is going on more fully, but can you report what happens when you run "git merge --ff-only v3.X-rcY"?

-- 
-Dan
Domenico Andreoli· Feb 9, 2012, 16:04 UTC · re: Dan Johnson · lore

Re: Merging tags does not fast-forward with git 1.7.9

On Thu, Feb 09, 2012 at 10:50:50AM -0500, Dan Johnson wrote:
Show 14 quoted lines
> On Thu, Feb 9, 2012 at 4:54 AM, Domenico Andreoli <cavokz@gmail.com> wrote:
> >
> >   with the recent changes in tag merging (I updated git to 1.7.9),
> > my usual "git merge v3.X-rcY" command does not fast-forward any more.
> > Of course the initial head is something like "v3.X-rcZ" without any
> > change so that it should (and usually did) fast-forward to the new head.
> >
> > The editor is instead fired off and I have to fill the details of a
> > merge commit, diverging from mainline as soon as I save and exit.
> >
> > Is there any simple and clear explanation for this? Thank you.
> 
> Someone else can explain what is going on more fully, but can you
> report what happens when you run "git merge --ff-only v3.X-rcY"?
This is Debian unstable, out-of-the-box git package 1.7.9-1.

$ git reset --hard v3.3-rc2 HEAD is now at 62aa2b5 Linux 3.3-rc2 $ git merge --ff-only v3.3-rc3 fatal: Not possible to fast-forward, aborting. $

Same for v3.3-rc1 -> v3.3-rc2.

Thanks, Domenico

Andreas Schwab· Feb 9, 2012, 16:30 UTC · re: Domenico Andreoli · lore

Re: Merging tags does not fast-forward with git 1.7.9

Domenico Andreoli <cavokz@gmail.com> writes:
Show 7 quoted lines
> This is Debian unstable, out-of-the-box git package 1.7.9-1.
>
> $ git reset --hard v3.3-rc2
> HEAD is now at 62aa2b5 Linux 3.3-rc2
> $ git merge --ff-only v3.3-rc3
> fatal: Not possible to fast-forward, aborting.
> $ 
Workaround:

$ git merge v3.3-rc3^{} Updating 62aa2b5..d65b4e9 Fast-forward

Andreas.
-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Carlos Martín Nieto· Feb 9, 2012, 16:06 UTC · re: Domenico Andreoli · lore

Re: Merging tags does not fast-forward with git 1.7.9

On Thu, 2012-02-09 at 10:54 +0100, Domenico Andreoli wrote:
Show 17 quoted lines
> Hi,
> 
>   with the recent changes in tag merging (I updated git to 1.7.9),
> my usual "git merge v3.X-rcY" command does not fast-forward any more.
> Of course the initial head is something like "v3.X-rcZ" without any
> change so that it should (and usually did) fast-forward to the new head.
> 
> The editor is instead fired off and I have to fill the details of a
> merge commit, diverging from mainline as soon as I save and exit.
> 
> Is there any simple and clear explanation for this? Thank you.
> 
> cheers,
> Domenico
> 
> ps: I admit I didn't follow the details about tag signatures so probably
> I missed something that I shouldn't.
This was discussed recently
http://thread.gmane.org/gmane.comp.version-control.git/189825
Domenico Andreoli· Feb 9, 2012, 16:18 UTC · re: Carlos Martín Nieto · lore

Re: Merging tags does not fast-forward with git 1.7.9

On Thu, Feb 09, 2012 at 05:06:41PM +0100, Carlos Martín Nieto wrote:
Show 22 quoted lines
> On Thu, 2012-02-09 at 10:54 +0100, Domenico Andreoli wrote:
> > Hi,
> > 
> >   with the recent changes in tag merging (I updated git to 1.7.9),
> > my usual "git merge v3.X-rcY" command does not fast-forward any more.
> > Of course the initial head is something like "v3.X-rcZ" without any
> > change so that it should (and usually did) fast-forward to the new head.
> > 
> > The editor is instead fired off and I have to fill the details of a
> > merge commit, diverging from mainline as soon as I save and exit.
> > 
> > Is there any simple and clear explanation for this? Thank you.
> > 
> > cheers,
> > Domenico
> > 
> > ps: I admit I didn't follow the details about tag signatures so probably
> > I missed something that I shouldn't.
> 
> This was discussed recently
> 
> http://thread.gmane.org/gmane.comp.version-control.git/189825
The command I was looking for is:
  $ git merge --ff-only v3.X-rcY^0

thanks, Domenico

Junio C Hamano· Feb 9, 2012, 18:05 UTC · re: Domenico Andreoli · lore

Re: Merging tags does not fast-forward with git 1.7.9

Domenico Andreoli <cavokz@gmail.com> writes:
>   with the recent changes in tag merging (I updated git to 1.7.9),
> my usual "git merge v3.X-rcY" command does not fast-forward any more.

Making "merge $tag" always record the signed tag information was the whole point of the change in 1.7.9, so asking to merge a tag will *not* fast forward by default anymore. "git merge v3.X-rcY^0" is a usable workaround in the meantime; we are also cooking a fix for a typical case where you ask for "git merge --ff-only v3.X-rcY" explicitly. This errored out incorrectly, which was discovered and fixed early this week and is cooking in the 'next' branch. We would like to push it out as part of 1.7.9.1, and we would need help testing it. The more people test it sooner, the likelier people will see more solid 1.7.9.1 release sooner.

> The editor is instead fired off and I have to fill the details of a
> merge commit, diverging from mainline as soon as I save and exit.

Yes, that "diverging from mainline" is really bad, and that is why we need the fix to honor "--ff-only" (which is the way to make sure you do not diverge) tested quicly so that we can push 1.7.9.1 out.

Thanks.

← back to recent threads