All of lore.kernel.org
 help / color / mirror / Atom feed
* Challenges for an octopus merge
@ 2011-02-10 14:30 Markus Elfring
  2011-02-10 16:09 ` Junio C Hamano
  2011-04-08 15:27 ` Markus Elfring
  0 siblings, 2 replies; 7+ messages in thread
From: Markus Elfring @ 2011-02-10 14:30 UTC (permalink / raw)
  To: git

Hello,

I have got an update history like the following in a local repository with ten 
patches in separate topic branches on my openSUSE 11.3 system.

master -> tag: v3.0 -> compilation_maintenance
               /->  errno => C1
              /->   braces => C2
             /->    string => C3
            /->     binary_search => C4
  -> route1 --->    temporary_files => C5
            \->     make_functions_static => C6
             \->    const-correctness => C7
              \->   signal_handling => C8
               \->  enum => C9
                \-> double_declaration_deletion => C10


elfring@Sonne:~/Projekte/BtYacc/lokal2> git --version && git checkout -b test3
git version 1.7.3.4
Switched to a new branch 'test3'
elfring@Sonne:~/Projekte/BtYacc/lokal2> git merge --no-ff --stat --verbose --log 
-m 'Combination of six topics' errno braces string binary_search temporary_files 
make_functions_static
Fast-forwarding to: errno
Trying simple merge with braces
Trying simple merge with string
Trying simple merge with binary_search
Trying simple merge with temporary_files
Simple merge did not work, trying automatic merge.
Auto-merging defs.h
Trying simple merge with make_functions_static
Simple merge did not work, trying automatic merge.
Auto-merging defs.h
ERROR: content conflict in defs.h
Auto-merging main.c
Auto-merging mkpar.c
fatal: merge program failed
Automatic merge failed; fix conflicts and then commit the result.


The merge description (suggested commit message) was fine in the display of the 
tool "Git GUI 0.13.0" (Tcl/Tk version 8.5.8).
I delete the conflict section in the header file "defs.h" completely.


elfring@Sonne:~/Projekte/BtYacc/lokal2> git merge --no-ff --stat --verbose --log 
-m 'Combination of four topics' const-correctness double_declaration_deletion 
enum signal_handling
Trying simple merge with const-correctness
Simple merge did not work, trying automatic merge.
Auto-merging defs.h
Auto-merging output.c
Auto-merging reader.c
Trying simple merge with double_declaration_deletion
Simple merge did not work, trying automatic merge.
Auto-merging mkpar.c
ERROR: content conflict in mkpar.c
fatal: merge program failed
Automated merge did not work.
Should not be doing an Octopus.
Merge with strategy octopus failed.


The merge description was missing (no commit message) in this case.
Is this omission acceptable?

I have also got the impression that the corresponding source files did not 
contain enough conflict markers.
Is my use case relevant for further considerations of details with this merging 
process?

Regards,
Markus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Challenges for an octopus merge
  2011-02-10 14:30 Challenges for an octopus merge Markus Elfring
@ 2011-02-10 16:09 ` Junio C Hamano
  2011-02-11 16:23   ` Markus Elfring
  2011-04-08 15:27 ` Markus Elfring
  1 sibling, 1 reply; 7+ messages in thread
From: Junio C Hamano @ 2011-02-10 16:09 UTC (permalink / raw)
  To: Markus Elfring; +Cc: git

Markus Elfring <Markus.Elfring@web.de> writes:

> ...
> Automated merge did not work.
> Should not be doing an Octopus.
> Merge with strategy octopus failed.
>
>
> The merge description was missing (no commit message) in this case.

The second-to-last line of the output needs to be rephrased.

Octopus is not for recording conflicting merges and when it punts you
shouldn't be attempting to resolve and record it as an octopus merge.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Challenges for an octopus merge
  2011-02-10 16:09 ` Junio C Hamano
@ 2011-02-11 16:23   ` Markus Elfring
  2011-02-11 18:22     ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: Markus Elfring @ 2011-02-11 16:23 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

> The second-to-last line of the output needs to be rephrased.

Which wording adjustment have you got in mind?


> Octopus is not for recording conflicting merges and when it punts you
> shouldn't be attempting to resolve and record it as an octopus merge.

Would it make sense to specify that the merging process may switch to the
strategy "resolve" on demand?

Regards,
Markus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Challenges for an octopus merge
  2011-02-11 16:23   ` Markus Elfring
@ 2011-02-11 18:22     ` Junio C Hamano
  2011-02-12  4:50       ` Markus Elfring
  2011-02-15 17:29       ` Markus Elfring
  0 siblings, 2 replies; 7+ messages in thread
From: Junio C Hamano @ 2011-02-11 18:22 UTC (permalink / raw)
  To: Markus Elfring; +Cc: git

Markus Elfring <Markus.Elfring@web.de> writes:

>> The second-to-last line of the output needs to be rephrased.
>
> Which wording adjustment have you got in mind?

Something along the two lines below to rephase the second-to-last line of
the output I quoted from your original message.

>> Octopus is not for recording conflicting merges and when it punts you
>> shouldn't be attempting to resolve and record it as an octopus merge.

> Would it make sense to specify that the merging process may switch to the
> strategy "resolve" on demand?

Depends on what you mean by "on demand", but if you mean "git merge A B C"
automagically turns into "git merge A; git merge B; git merge C" then I
don't think that makes much sense.  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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Challenges for an octopus merge
  2011-02-11 18:22     ` Junio C Hamano
@ 2011-02-12  4:50       ` Markus Elfring
  2011-02-15 17:29       ` Markus Elfring
  1 sibling, 0 replies; 7+ messages in thread
From: Markus Elfring @ 2011-02-12  4:50 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

> 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 have inspected my situation a bit more. I hope that the merging process can be 
improved so that it can cope with my update suggestions here.

Would anybody (besides me) like to look into the affected patches and source 
files if the tool "Git" can provide a better service?

Does it make sense to add these files to your test-suite?

Regards,
Markus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Challenges for an octopus merge
  2011-02-11 18:22     ` Junio C Hamano
  2011-02-12  4:50       ` Markus Elfring
@ 2011-02-15 17:29       ` Markus Elfring
  1 sibling, 0 replies; 7+ messages in thread
From: Markus Elfring @ 2011-02-15 17:29 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Challenges for an octopus merge
  2011-02-10 14:30 Challenges for an octopus merge Markus Elfring
  2011-02-10 16:09 ` Junio C Hamano
@ 2011-04-08 15:27 ` Markus Elfring
  1 sibling, 0 replies; 7+ messages in thread
From: Markus Elfring @ 2011-04-08 15:27 UTC (permalink / raw)
  To: git

> Automatic merge failed; fix conflicts and then commit the result.

I would appreciate if the implementations of merge procedures could be improved 
so that work results like the following can be achieved in an easier way.
https://github.com/elfring/BtYacc/tree/route1

Can any documentation updates help in this use case, too?

Regards,
Markus

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-04-08 15:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 14:30 Challenges for an octopus merge Markus Elfring
2011-02-10 16:09 ` Junio C Hamano
2011-02-11 16:23   ` Markus Elfring
2011-02-11 18:22     ` Junio C Hamano
2011-02-12  4:50       ` Markus Elfring
2011-02-15 17:29       ` Markus Elfring
2011-04-08 15:27 ` Markus Elfring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.