Is it possible that a git merge without conflicts breaks application functionalities?

Viewed 171

Few times, I merge a branch into mine, fix the conflicts with close attention and still some functionalities of my application are broken. It is probably my bad trying wrongly to resolve the conflicts, but is it possible that in some cases that git did not raised conflicts but still merge the files in a wrong manner?

Let's say I have the following scenario:

  • Two giant branches that differs a lot.
  • Most of the tests of the branches are common but some differ.
  • I merge these branches and it merges without conflicts.

Is it possible in some cases that some tests are broken after the merge?

1 Answers

Sometimes it happens. One easy example is if there are API changes on a branch. All the calls on that branch will be adjusted for the new API. How about in another branch, a new call to the adjusted-on-the-other-branch function/method be added? If you merge both branches, it is very unlikely that you will get a conflict out of this API change..... but the code will probably be broken because the new call is still using the old API.

If you have an amazing set of unit/integration tests, this problem would be detected before wrapping up the merge. Say, I merge. I test.... if I see that something is broken, I fix it, I amend the merge revision and then I can move on.

Related