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
Thomas Guyot <tguyot@gmail.com>
Date
Mar 23, 2024, 19:17 UTC
Message-ID
<d8fa6ab2-949b-4d6f-9c8f-e80f2e524fb7@gmail.com>
In-Reply-To
<CA+XMOBuYVWwEE-p=3GHBUcnnM_jn0pneW1rbcQU124DjnJYycA@mail.gmail.com>
On 2024-03-16 05:19, Kai wrote:
Show 12 quoted lines
> Thanks a lot for the explanations Brian and Hannes. That clarifies it
> a lot. I had not come across such a semantic issue in my limited
> experience with git before, so I was a bit thrown off.
>
> Given this behavior, I still think it would be a great feature for the
> person doing the merge to at least optionally be able to see
> highlighted parts of the code that had any changes between the base
> and the other two branches. Since these parts of the code could
> potentially cause problems much more than lines of code that have not
> been touched by any branch. But I guess that would be more a GUI
> feature than related to git directly, correct? Maybe there is already
> a GUI offering that?

The --diff-merges=combined option (or simply "-c") of git show is probably what you're looking for.

There is also a dense-combined (or "--cc") option that skips seemingly unrelated hunks, which doesn't mean these hunk aren't problematic, just that there's 6+ lines appart.

Regards,

-- Thomas

Previous: Kai
Message 8 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.