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

Re: Merge priority

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 26, 2009, 19:47 UTC
Message-ID
<7vmy295arj.fsf@alter.siamese.dyndns.org>
In-Reply-To
<81b0412b0911260742l4beb2305y87c01dd61d7c2b57@mail.gmail.com>
Alex Riesen <raa.lkml@gmail.com> writes:
> You can take a look at rerere, though. It should help resolving repeating
> conflicts  by recording a resolution of your choice.
Use of rerere often helps but there is a caveat.

Even if two branches (e.g. 'master' and 'maint') currently has the same tree, the desired outcome of merging the same commit into them could be different depending on the purpose of these branches. You may want to resolve a conflicted merge into 'maint' more conservatively than the way you would resolve the exact same merge into 'master'.

Imagine a case where 'master' branch added a better helper functions in other files, but they are not in 'maint' yet, and the conflicted part could be resolved better if you made it call these newer helper functions available only in 'master'.

Unfortunately the conflicts would look exactly the same to rerere, so if you record the result of the merge to 'master', replaying that resolution while merging the same commit to 'maint' would produce undesirable result.

As to "does the aggregated result make sense if you blindly add changes in 'stable' for only conflicted parts to an automerge result?", which was your other point, you may refer your readers to Avery's recent updates to resurrect -Xours option to "git merge".

Previous: Alex RiesenNext: Martin Langhoff
Message 3 of 4 in “Merge priority”
  1. Howard MillerNov 26, 2009
  2. Alex RiesenNov 26, 2009
  3. Junio C HamanoNov 26, 2009
  4. Martin LanghoffNov 26, 2009

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.