Volume 1 · Book 12 · Hadith 812
Narrated Ibn 'Umar: During the holy battle of Khaibar the Prophet said, "Whoever ate from this plant (i.e. garlic) should not enter our mosque."
— Sahih Bukhari, Volume 1, Book 12: Characteristics of Prayer, Hadith #812