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

Re: force "unmerged" for same-file auto-merges

From
Sitaram Chamarty <sitaramc@gmail.com>
Date
Mar 27, 2010, 08:56 UTC
Message-ID
<2e24e5b91003270156r11ae9155s6e00a2ab27e9f479@mail.gmail.com>
In-Reply-To
<hobqoc$5h3$1@dough.gmane.org>
On Wed, Mar 24, 2010 at 7:14 AM, Neal Kreitzinger <neal@rsss.com> wrote:
> Scenario:  "same-file auto-merge":  when two different people change the
> same file in their separate repos.  Their changes do not conflict in the
> sense that they are changes to the same lines.  However, their changes do
> conflict in the sense that the resulting merged logic is incorrect.

You're not being pessimistic enough :-) A ".h" file that changed only on one side can cause the same logic issues

Show 6 quoted lines
> Desired Solution:
> Perform same-file auto-merge and produce auto-merge results, but mark all
> such auto-merged files as "unmerged" so that they must be reviewed/resolved
> before a git-commit.  The "unmerged" status allows git-mergetool to be run
> (e.g. kdiff3) so that the merged lines can be reviewed.  In this way, all
> auto-merged files are reviewed.

No. What you need is a full blown diff for the merge, with both sides being compared with respect to the common merge-base. That diff will be pretty big, although I'm not sure what diff options would actually produce that (but I'll bet "-m" figures somewhere).

Previous: Junio C Hamano
Message 5 of 5 in “force "unmerged" for same-file auto-merges”
  1. Neal KreitzingerMar 24, 2010
  2. Neal KreitzingerMar 26, 2010
  3. Dilip MMar 27, 2010
  4. Junio C HamanoMar 26, 2010
  5. Sitaram ChamartyMar 27, 2010

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.