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

Re: more merge strategies : feature request

From
Caleb Cushing <xenoterracide@gmail.com>
Date
Dec 2, 2008, 14:28 UTC
Message-ID
<81bfc67a0812020628l53c209a6yca5a619d211b6bfc@mail.gmail.com>
In-Reply-To
<20081202033013.GD6804@coredump.intra.peff.net>
>
> It's not clear to me exactly what you want. Let's say I have a file
>  ....
I'm afraid I don't fully understand your example

lets say git merge foo bar foo bar 1 1 2 8 3 3 4 4 5 5 6 7

lines 6 and 7 are new in foo line 2 has a conflict because the other head has an 8, history wise because of an early merge the other direction and fix, there was the 8 in foo and it was changed to a 2, when I merge back it will overwrite the 8 with a 2. however I need the 8 to be the 8 and the 2 to be the 2. but I want the 6 and 7 in both.

conflict would create a conflict
such as

foo 1 <<<<<< bar 8 ====== 2

>>>>>>  foo

3 4 5 6 7

no overwrite would result in file1 looking like this

1 8 3 4 5 6 7

>  Did you want conflict markers in the resulting file? If so, what should
>  the conflict markers look like, since there isn't actually a conflict?

if the the remote and local branches are not identical there's a difference which should be able to result in a conflict. for all purposes I'm not sure git couldn't just ignore the history of the files and do a straight head to head merge. the steps you suggest make it more complicated than it needs to be an if done post merge or without merge will probably be need to be done again in a future merge if merging back and forth

-- 
Caleb Cushing
Previous: Jeff KingNext: Jeff King
Message 5 of 13 in “more merge strategies : feature request”
  1. Caleb CushingNov 29, 2008
  2. Andreas EricssonDec 1, 2008
  3. Caleb CushingDec 2, 2008
  4. Jeff KingDec 2, 2008
  5. Caleb CushingDec 2, 2008
  6. Jeff KingDec 2, 2008
  7. Leo RazoumovDec 2, 2008
  8. Caleb CushingDec 2, 2008
  9. Leo RazoumovDec 3, 2008
  10. Nanako ShiraishiDec 3, 2008
  11. Caleb CushingDec 3, 2008
  12. Junio C HamanoDec 4, 2008
  13. Nanako ShiraishiDec 4, 2008

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.