On Wed, Apr 5, 2017 at 11:10 PM, Ben Nason <[email protected]> wrote:
> Hi,
>
> In git if you replace a subdirectory with a submodule in one branch,
> every successive merge from another branch without that change will
> cause a conflict. To reproduce this please see below (DOS batch file).
>
> Is this expected behavior?

Yes.

"git submodule update [--init]" only (creates or) updates existing
submodules. It doesn't take care of removing submodules that are
no longer recorded in the tree.

"git merge" currently also does not touch submodules. (we may have
git merge --recurse-submodules soon, though). So as soon as there
is a conflict between the submodule (or an unrelated repo, who happens
to live inside this other repo), and new directories/files that would appear,
the merge errors out.

Ideally Git would be smarter than the current behavior.

Stefan

Reply via email to