I never understood how the diary even knew who Harry Potter was. The diary was made before Voldemort ever encountered Harry. Where did the memories come from? You think Ginny gave it all the deets?
Yeah, Ginny filled him in on what happened:
‘The diary,’ said Riddle. ‘My diary. Little Ginny’s been writing in it for months and months, telling me all her pitiful worries and woes: how her brothers tease her, how she had to come to school with second-hand robes and books, how –’ Riddle’s eyes glinted ‘– how she didn’t think famous, good, great Harry Potter would ever like her …’
– CoS, chapter 17
I imagine that once the topic of who this Harry Potter fellow was and why he was famous came up, Tom would have become very interested and pressed Ginny for more details. “He defeated who? When he was only a baby‽”