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

Re: [PATCH] merge: refuse to create too cool a merge by default

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 6, 2016, 19:18 UTC
Message-ID
<xmqqshyywnp2.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CA+55aFy-mb00=KGWghx5XXfkv5dChnncoLoJA07f_2Y_or0FOw@mail.gmail.com>
Linus Torvalds <torvalds@linux-foundation.org> writes:
> ... And I guess it might not be too nasty
> to add: it could be done as part of the object checking pass after
> downloading the pack. Was that what you were thinking of?
Not that fancy, actually.  Running an equivalent of
    git rev-list --max-parents=0 ^HEAD FETCH_HEAD

was what I had in mind. This shouldn't be too costly for a normal case (O(N) where N is the number of changes on FETCH_HEAD since it forked from you).

It needs to be done even when FETCH_HEAD is a descendant of HEAD, (i.e. when we would have fast forwarded without creating a merge) to be effective, as --no-allow-new-root is about not trusting your subsystem people not doing silly things on purpose, unlike our original patches.

Previous: Linus TorvaldsNext: Eric Sunshine
Message 6 of 10 in “merge: refuse to create too cool a merge by default”
  1. merge: refuse to create too cool a merge by defaultJunio C Hamano, Mar 18, 2016
  2. Linus TorvaldsMar 18, 2016
  3. Junio C HamanoMar 18, 2016
  4. Junio C HamanoApr 6, 2016
  5. Linus TorvaldsApr 6, 2016
  6. Junio C HamanoApr 6, 2016
  7. Eric SunshineMar 18, 2016
  8. Ramsay JonesMar 18, 2016
  9. David TurnerMar 18, 2016
  10. Junio C HamanoMar 18, 2016

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.