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

Re: How do git recognize conflicts?

From
Johannes Sixt <j6t@kdbg.org>
Date
Sep 6, 2024, 07:03 UTC
Message-ID
<39f85eac-c6af-444a-a514-ad7172748350@kdbg.org>
In-Reply-To
<CADLV-7K7uumH+ikT6B2H39XR-eX21xBzUSNbeyVv2wM2q1e=QQ@mail.gmail.com>
Please use "Reply to all" on this mailing list and please do not top-post.
Am 06.09.24 um 07:09 schrieb KwonHyun Kim:
Show 5 quoted lines
>   Thank you for the answer,
> 
>   Is there any other exceptions from line-by-line change?
> 
>   Can I ask you of any reference?

Another "exception" would be a modify-delete conflict, i.e., where one side modifies the file and the other deletes it.

Apart from that, you would have to dig into the source code.
-- Hannes
Show 39 quoted lines
> 
> -- KwH Kim
> 
> 2024년 9월 6일 (금) 오전 1:39, Johannes Sixt <j6t@kdbg.org>님이 작성:
> 
>>
>> Am 05.09.24 um 16:10 schrieb KwonHyun Kim:
>>>  Hi, there.
>>>
>>>  At first, I thought it's determined by line.
>>>
>>>  But as I experimented, it does not look so.
>>>
>>>  Here's what I experimented
>>>
>>>  merge-base ====
>>>
>>>  hi all
>>>
>>>  branch BrA ===
>>>
>>>  hi everyone
>>>
>>>  branch BrB ===
>>>
>>>  hi all
>>>  good to see you
>>>
>>>  when I merge BrB from BrA, I get conflicts.
>>>
>>>  but the first line is only changed in BrA,
>>>  and BrB added a line so there is no reason to have a conflict...
>>>  that's what i think
>>
>> If the changes in the two branches are in adjacent lines, then that is
>> considered a conflict as well.
>>
>> -- Hannes
>>
Previous: Johannes SixtNext: KwonHyun Kim
Message 3 of 4 in “How do git recognize conflicts?”
  1. KwonHyun KimSep 5, 2024
  2. Johannes SixtSep 5, 2024
  3. Johannes SixtSep 6, 2024
  4. KwonHyun KimSep 6, 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.