(Imām Bukhārī narrates): Sa'id bin Ufair narrated to us, he said: Ibn Wahb narrated to us from Yunus from Ibn Shihab, Ata said that Jabir bin Abdullah, may Allāh be pleased with them both, said that the Prophet ﷺ said:
Whoever eats garlic or onion should keep away from us, or he said: should keep away from our mosque, and sit in his house. And indeed a pot was brought to the Prophet ﷺ in which there were some vegetables. He smelled an odour from them. He asked about them. He was told that they contained such and such vegetables. He said: Bring them near to some of the Companions who were with him at that time. When he saw them, he disliked their eating it. He said: You eat, for I converse with one with whom you do not converse.
And Ahmad bin Salih said from Ibn Wahb: A large tray was brought to him. Ibn Wahb said: That is, a tray was brought to him in which there were vegetables. And Laith and Abu Safwan from Yunus did not mention the story of the pot, so I do not know whether it is the saying of al-Zuhri or part of the hadeeth.
Reference: Sahih Al Bukhari 855