# Bug: cherry-pick & submodule

1 messages from 2017-11-10 to 2017-11-10. Participants: Ефимов Василий.
Thread: https://gitlist.dev/t/47156

## Ефимов Василий, 2017-11-10 16:00

Subject: Bug: cherry-pick & submodule
Message-ID: <c48bf9f3-10b2-dfac-a207-74a57e66b848@ispras.ru>
URL: https://gitlist.dev/e/c48bf9f3-10b2-dfac-a207-74a57e66b848%40ispras.ru

```
I faced an unexpected behaviour during cherry-picking
a commit to a branch with a submodule.

Git graph:

A -- B [master]
  \
   `- C -- D [test]

Both branches have a file with name `a_file`.
It has been added by commit A.
Commits B and C add a folder with name `a_submodule` to the respective 
branches.
Commit C does it regularly by adding a file with name `a_submodule/content`.
Commit B adds a submodule with name `a_submodule`.
Commit D only modifies `a_file`.
Note that `a_file` and `a_submodule` are not related.

[repo]
   |- a_file
   `- a_submodule

When I trying to cherry pick commit D on commit B, I got
a conflict with `a_submodule`. Changes of `a_file` are
successfully cherry-picked.

I expected, that there would be no conflicts.

A bash script reproducing the bug is attached.

Vasily.

```
