{"thread":{"id":"46000","subject":"git merges of tags","startedAt":"2017-05-18T23:23:59Z","lastAt":"2017-05-19T18:31:13Z","messageCount":2,"participants":["Stephen Rothwell","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"320241","messageId":"20170519092202.6b0f9a57@canb.auug.org.au","threadId":"46000","inReplyTo":null,"subject":"git merges of tags","fromName":"Stephen Rothwell","fromEmail":"sfr@canb.auug.org.au","sentAt":"2017-05-18T23:23:36Z","receivedAt":"2017-05-18T23:23:59Z","isPatch":false,"sender":{"key":"sfr@canb.auug.org.au","avatar":null},"body":"Hi all,\n\nJust a reminder that if you are merging Linus' tree (or any tree\nreally) via a tag, git was changed some time ago so that merging a tag\nwill not do a fast forward (there is a good reason for this - I just\ncan't recall it ATM).  This is a problem when your current head of\nbranch has been merged into (e.g.) Linus' tree and then you do \"git\nmerge <tag>\" on a tag that is later than the merge point.  You end up\nwith an unnecessary merge commit rather than just fast forwarding.\n\nTo do the fast forward, try \"git merge <tag>^{}\" ... (unfortunately\ndoing \"git merge --ff <tag>\" also does not do a fast forward - it also\ndoesn't fail, it unexpectedly just creates a merge commit :-().\n-- \nCheers,\nStephen Rothwell\n"},{"id":"320279","messageId":"CA+55aFwaxsNZ0ACQkASdDTbSrdcHMJpFPtswK485tEWRBVVYrA@mail.gmail.com","threadId":"46000","inReplyTo":"20170519092202.6b0f9a57@canb.auug.org.au","subject":"Re: git merges of tags","fromName":"Linus Torvalds","fromEmail":"torvalds@linux-foundation.org","sentAt":"2017-05-19T18:30:55Z","receivedAt":"2017-05-19T18:31:13Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"On Thu, May 18, 2017 at 4:23 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:\n>\n> Just a reminder that if you are merging Linus' tree (or any tree\n> really) via a tag, git was changed some time ago so that merging a tag\n> will not do a fast forward (there is a good reason for this - I just\n> can't recall it ATM).\n\nThe reason is that when you merge a signed tag, git squirrels away t\nhe signature into the merge commit, so that you can see and verify the\nsignage later (use \"git log --show-signatures\" to see the signatures\non the commits).\n\nIf you fast-forward, there isn't any new commit to add the signing data to.\n\n> To do the fast forward, try \"git merge <tag>^{}\" ...\n\nA slightly simpler syntax might be just \"tag^0\", but yes, the \"^{}\"\nthing peels off any tags.\n\n>   (unfortunately\n> doing \"git merge --ff <tag>\" also does not do a fast forward - it also\n> doesn't fail, it unexpectedly just creates a merge commit :-().\n\n\"--ff\" is the default behavior, and means \"allow fast forward\", but\nnote that it is about \"allowing\", not \"forcing\".\n\nYou can use \"--ff-only\" to say that you will _only_ accept a\nfast-forward, and git will error out  if it needs to create a merge.\n\n                  Linus\n"}]}