Honestly, given the details provided, everyone saying report it! just seems like a major overreaction to me.
My coworker and I worked on a project for over 2 years swapping commits back and forth, and yes, sometimes we would reuse or optimize each others code.
I don't know what kind of culture you work in, but if it somehow defines work in lines of code rather than end product and overall contribution it seems rather toxic and competitive. My advice would be that you don't run up the chain of command looking for some form of retribution. If it's that big of a deal to you talk to your Manager about how to determine credit for things and then document in whatever way they describe.
The point I most wanted to address was your relationship with your colleague. In my honest opinion if my coworker came up to me one day and exclaimed, "Don't use my code! It's my code!", and then got me in trouble with management over something I wasn't purposely or maliciously doing, I would think he was a self-important twit. I would keep this in mind, because from the question it's unclear as to whether or not they truly stole your code, or were perhaps just merging in changes in an odd way.
The accusation (which is a big accusation to make ) - if it doesn't completely ruin your professional relationship, it would most certainly lower their personal opinion of you. No big deal if you're right. I'm a fan of "you dig your own grave" type thinking - but if you're wrong, the damage to your working relationship could be quite substantial. Office politics are a tricky thing!
Now, if you're absolutely positive that he is stealing and taking credit for things that he did not do, feel free to contact your Manager and take the appropriate measures to make sure he is reprimanded for that type of behavior - however, if you're not really sure, perhaps reconsider. Plagiarism isn't something to claim lightly, especially when it can affect your day-to-day life for quite a long time.