I am trying to figure out why the diff shown in the "compare files" does not actually reflect the changes I have been making. This seems to be a new problem in the last few days; I have used the "compare files" view MANY times before at work etc and it has always reflected the correct main branch, whereas now it has not.
Here is what is currently in my main branch (a test repo to figure out what the hell the problem is):
// this is the entirety of main.js
function addition(a, b) {
return a + b
}
And here is what I am merging into it:
// this is the entirety of main.js
const difference = (num1, num2) => (
num1 - num2
);
In my pull request, I would expect to see a merge conflict, since I am adding to the first few lines of my code. And I am getting the little bar that says "this branch has conflicts that must be resolved". However, when I look at the compare files view, this is what I see:
The view does not recognize that in the main branch, there is clearly already a function there:
I cannot come up with a reason why this might be so. Is it a hiccup with the "compare files" view? Could it possibly have something to do with the way that I have taken the branch off of main?
For me, this is not a huge deal; pulling / rebasing main into my current branch and handling the merge conflicts in my text editor is totally fine. I ask this because I am working with students who are new to git, and very new to group git in particular, and I would like to know why this unexpected behavior is happening so that I can explain it to them.
If you would like to check out the repo itself, here it is.
Thank you!

