Re: [BUG?] Issue with merging from another branch after replacing subdirectory with submodule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 5, 2017 at 11:10 PM, Ben Nason <bnason@xxxxxxxxxxx> 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



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]