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

Re: Challenges for an octopus merge

From
MEMarkus Elfring <markus.elfring@web.de>
Date
Feb 15, 2011, 17:29 UTC
Message-ID
<4D5AB7F6.8040508@web.de>
In-Reply-To
<7vd3my1leq.fsf@alter.siamese.dyndns.org>
> The user needs to decide what to do next; the user may choose to do "git merge A C ; git merge B" instead,
> but *after* inspecting the situation.
I find a few of the applied conflict markers strange after my inspection.
1. They suggest to choose one of the involved changes. But how do you think 
about the situation if I found that the right resolution is to delete the 
conflict section completely?
    Why was the merging process not able to come to the same conclusion 
automatically?
2. My tenth patch would like to delete six consecutive lines in a source file in 
a way similar to the following example.
-drop 1 ...;
-drop 2 ...;
-drop 3 ...;
-drop 4 ...;
-
-
  void make_parser()

elfring@Sonne:~/Projekte/BtYacc/lokal2> git merge --stat --verbose -m 'Deletion of duplicated function declarations' double_declaration_deletion

Auto-merging
mkpar.c 
 
CONFLICT (content): Merge conflict in mkpar.c 
 
Automatic merge failed; fix conflicts and then commit the result.
But the Git GUI displays this conflict like the following.
   <<<<<<< HEAD
  +drop 1 ...;
  +drop 2 ...;
  +drop 3 ...;
  +drop 4 ...;
  +
  +static void find_final_state(void)
   =======
+ void make_parser()
+ {
...
+ }
+
+ void find_final_state()
   >>>>>>> double_declaration_deletion
I find three details suspicious here.
- Why are these lines marked for addition again?
- Why is the function "find_final_state" referenced? (Does this indicate an 
off-by-one error in the first block?)
- Why are those parts like make_parser() not omitted that were moved to 
different places in this source file by a previous patch?
I would appreciate your advices.

Regards, Markus

Previous: Markus ElfringNext: Markus Elfring
Message 6 of 7 in “Challenges for an octopus merge”
  1. Markus ElfringFeb 10, 2011
  2. Junio C HamanoFeb 10, 2011
  3. Markus ElfringFeb 11, 2011
  4. Junio C HamanoFeb 11, 2011
  5. Markus ElfringFeb 12, 2011
  6. Markus ElfringFeb 15, 2011
  7. Markus ElfringApr 8, 2011

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.