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

Re: linux-next: manual merge of the security-testing tree with the tree

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 30, 2011, 18:52 UTC
Message-ID
<7v4o37qhi6.fsf@alter.siamese.dyndns.org>
In-Reply-To
<BANLkTi=usrsF60Popfu55v3_dXe7Yo0GrA@mail.gmail.com>
Linus Torvalds <torvalds@linux-foundation.org> writes:
Show 10 quoted lines
> It would be lovely if "git show" (and log operations) had some option
> to do a "expensive merge check" and did actually figure out the common
> ancestor and at least took that into account.
>
> It would be doable to do it at least better than we do now - the
> common ancestor is not cheap to compute, but it's much cheaper than a
> full merge, and would at least allow us to flag dangerous merges. Of
> course, it gets fun when there are multiple common ancestors and
> renames. It's entirely possible that it's never going to be practical
> to do anything but "re-do the merge and compare result".

I would have to say that it would boil down to "re-do the merge" whichever way we implement it, and it is not necessarily a bad thing.

There are ideas to implement a mode of "git merge" that works entirely in-core without touching the working tree (it may have to write temporary blobs and possibly trees to the object store, though). It would let sites like github to let its users accept a trivial pull request that can merge cleanly on site in the browser without necessarily having to have a local checkout used for conflict resolution.

If such an "in-core merge" feature is implemented cleanly in a reusable way, it would be just the matter of comparing the output from it with the actual committed result.

Of course, if the committed result was deliberately made by "-s ours", comparison between an auto-merge result and the committed result would produce a lot of noise, but that is really the point of "expensie merge check", so the noise in that scenario is a feature, not a bug.

Previous: Linus TorvaldsNext: Jeff King
Message 10 of 11 in “linux-next: manual merge of the security-testing tree with the tree”
  1. Stephen RothwellJun 30, 2011
  2. Stephen RothwellJun 30, 2011
  3. Stephen RothwellJun 30, 2011
  4. James MorrisJun 30, 2011
  5. Stephen RothwellJun 30, 2011
  6. Uwe Kleine-KönigJun 30, 2011
  7. Stephen RothwellJun 30, 2011
  8. Uwe Kleine-KönigJun 30, 2011
  9. Linus TorvaldsJun 30, 2011
  10. Junio C HamanoJun 30, 2011
  11. Jeff KingJun 30, 2011

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.