Thread (16 messages) 16 messages, 5 authors, 2018-05-07

Re: git merge banch w/ different submodule revision

From: Elijah Newren <hidden>
Date: 2018-04-27 00:02:37

On Thu, Apr 26, 2018 at 2:46 PM, Jacob Keller [off-list ref] wrote:
On Thu, Apr 26, 2018 at 10:56 AM, Stefan Beller [off-list ref] wrote:
quoted
We often treating a submodule as a file from the superproject, but not always.
And in case of a merge, git seems to be a bit smarter than treating it
as a textfile
with two different lines.
Sure, but a submodule is checked out "at a commit", so if two branches
of history are merged, and they conflict over which place the
submodule is at.... shouldn't that produce a conflict??
By "which place a submodule is at", do you mean the commit it points
to, or the path at which the submodule is found within the parent
repository?  Continuing on it sounds like you meant the former, but I
was unsure if you were asking mutliple different questions here.
I mean, how is the merge algorithm supposed to know which is right?
The patch you linked appears to be able to resolve it to the one which
contains both commits.. but that may not actually be true since you
can rewind submodules since they're *pointers* to commits, not commits
themselves.
Only if both commits also contain the base; see lines 328 to 332 of
that patch.  So, if the submodules are rewound, that algorithm would
leave them as conflicted.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help