threads / bug / 47156

Bug: cherry-pick & submodule

Subject: Bug: cherry-pick & submodule

## tl;dr

One message between Nov 10, 2017 and Nov 10, 2017.

replies: 0people: 1as markdown or json

Ефимов Василий· Nov 10, 2017, 16:00 UTC · lore

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.

← back to recent threads