1.
Consider the merge shown in Figure 5.1.1. As shown in the right-hand panel, the maintainers have merged commits into the
main
branch that fix several bugs that existed in the program. The left-hand panel shows a contributor’s feature branch with has been changed to use more descriptive variable names but that has not fixed the bugs. The center panel shows the best common ancestor of the feature and main
branches.(a)
Study the program in the
main
branch and then describe in a sentence the computation that the program is trying to perform. Note: The Feature Branch and the Best Common Ancestor both contain bugs.(b)
Hint.
Merge conflicts occur when both source branches change the same line.
(c)
Hint.
Merge conflicts occur when both source branches change the same line.
(d)
Would the feature branch in Figure 5.1.1 be able to be merged automatically by the project maintainers? Briefly explain your answer.