Sahih Muslim Book 023, Hadith Number 5097.
Chapter : Permissibility of eating garlic, but avoiding it when one intends to talk to eminent persons.
Abd Ayyub Ansari reported that when food was brought to Allah's Messenger (may peace be upon him) he ate out of that, and sent the remaining part to me, and one day he sent to me the left-over; (I found that he) had not taken from it at all for it included garlic. I asked him whether that was forbidden, whereupon he said: No, but I do not like it because of its odour. He (Abu Ayyub Ansiri) said: Then I also do not like what you do not like.