felipec / git-reintegrate

Tool that allows the regeneration of integration branches
22 stars 8 forks source link

Wrong merges in presence of not-in-sync submodules #12

Closed ydirson closed 3 years ago

ydirson commented 5 years ago

git-reintegrates commits all changes when merging, and this possibly includes spurious submodule changes.

Cases where this happens includes:

felipec commented 4 years ago

Can you write an example script that generates this error?

ydirson commented 4 years ago

Will do.

If I understand correcty, it happens on when you have first a merge that gets solved by autocontinue, and then a submodule update. I guess autocontinue uses something like "add -u" which takes the submodule change by mistake.

felipec commented 3 years ago

I'm not familiar with submodules. You would have to write a script to reproduce the issue.

ydirson commented 3 years ago

Finally took the time to write this test, see https://github.com/felipec/git-reintegrate/pull/15

felipec commented 3 years ago

All right, now that I was able to reproduce I saw an easy improvement that fixes it.