git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: linux-next: unnecessary merge in the v4l-dvb tree

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Feb 12, 2018, 21:15 UTC
Message-ID
<CA+55aFwM0vy+pw-Xv=gA19ULMwAXNPhdO3qR5A3hkMrZKJFNSQ@mail.gmail.com>
In-Reply-To
<20180213080036.3bf3a908@canb.auug.org.au>
On Mon, Feb 12, 2018 at 1:00 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Linus, this happens a bit after the merge window, so I am wondering
> about the rational of not doing a fast forward merge when merging a
> signed tag (I forget the reasoning).

The reasoning is to avoid losing the signature from the tag (when merging a signed tag, the signature gets inserted into the merge commit itself - use "git log --show-signature" to see them).

So when I merge a signed tag, I do *not* want to fast-forward to the top commit, because then I'd lose the signature from the tag. Thus the "merging signed tags are non-fast-forward by default" reasoning.

But, yes, that reasoning is really only valid for proper merges of new features, not for back-merges.

The problem, of course, is that since git is distributed, git doesn't know who is "upstream" and who is "downstream", so there's no _technical_ difference between merging a development tree, and a development tree doing a back-merge of the upstream tree.

Maybe it was a mistake to make signed tag merges non-fast-forward, since they cause these kinds of issues with people who use "pull" to update their otherwise unmodified trees.

I can always teach myself to just use --no-ff, since I end up doing things like verifying at the signatures anyway.

Junio, comments?
               Linus
Next: Mauro Carvalho Chehab
Message 1 of 15 in “Re: linux-next: unnecessary merge in the v4l-dvb tree”
  1. Linus TorvaldsFeb 12, 2018
  2. Mauro Carvalho ChehabFeb 12, 2018
  3. Junio C HamanoFeb 12, 2018
  4. Linus TorvaldsFeb 12, 2018
  5. Junio C HamanoFeb 12, 2018
  6. Linus TorvaldsFeb 12, 2018
  7. Junio C HamanoFeb 12, 2018
  8. Mauro Carvalho ChehabFeb 13, 2018
  9. Junio C HamanoFeb 13, 2018
  10. Linus TorvaldsFeb 13, 2018
  11. Junio C HamanoFeb 14, 2018
  12. merge: allow fast-forward when merging a tracked tagJunio C Hamano, Feb 15, 2018
  13. Eric SunshineFeb 15, 2018
  14. Junio C HamanoFeb 16, 2018
  15. merge: allow fast-forward when merging a tracked tagJunio C Hamano, Feb 16, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.