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

Re: Git is not recognizing some merge conflicts and just accepting incoming master version

From
Johannes Sixt <j6t@kdbg.org>
Date
Mar 15, 2024, 22:19 UTC
Message-ID
<ebd073ef-4ba4-44df-919a-2adefb40e3e7@kdbg.org>
In-Reply-To
<CA+XMOBskofgsmCbcchmPYo9rF9+Cdtdj_m8VzQrLbGhZPm+mrw@mail.gmail.com>
Am 15.03.24 um 14:22 schrieb Kai:
Show 5 quoted lines
> If this is expected behavior, this is a big issue in this case, as I
> cannot trust that after sorting all conflicts that my code will work.
> In that case I would need to manually review every diff. Or is there
> maybe a stricter mode for merge conflicts, to also highlight these
> types of differences?

Brian has already explained that the result is the expected one. For Git, the text is just lines of text and that's all it cares about. But for us (and the systems that use the texts, compilers, web servers...) they are much more than that: they carry meaning. Git doesn't care about the meaning.

It is correct to some degree that you cannot trust the result of a merge. It will be correct on the line-of-text-basis, but it is not necessarily correct when it comes to the meaning of the text.

Yes, you have to manually review every (not diff, but) merge result. That's the responsibility of the person doing the merge, who at best understands both branches being merged.[*] It is of utmost importance that a merge result produced by Git is not taken without thinking. It is never a no-brainer.

[*] That is where good commit messages shine.
-- Hannes
Previous: brian m. carlsonNext: Junio C Hamano
Message 5 of 8 in “Git is not recognizing some merge conflicts and just accepting incoming master version”
  1. KaiMar 14, 2024
  2. Johannes SixtMar 15, 2024
  3. KaiMar 15, 2024
  4. brian m. carlsonMar 15, 2024
  5. Johannes SixtMar 15, 2024
  6. Junio C HamanoMar 15, 2024
  7. KaiMar 16, 2024
  8. Thomas GuyotMar 23, 2024

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.