the reason in ayurveda that onions and garlic are to be avoided is because they can agitate or excite the body and make it difficult for meditation.
yet, they are not completely restricted because it is understood that garlic and onions have extreme health benefits. So, the restriction is actually quite simple. When one is going to partake in a time of meditation, they should forgo these foods before the meditation, and can consume them after the meditation. then, they can fast from these foods until the next meditation.
there are many others foods that fit into the same category as onions and garlic--chocolate being one of them, as are many grains, mushrooms and related, some nuts, meats, and so on.
jains tend to have the most strict diets, some of them being vegan. many are lacto-vegetarian, but more strict than hindus in their consumption (not consuming as much as one finds in the typical hindu diet). hindus may be lacto-vegetarian or consume fish (depending upon the region). Sikhs often consume various meats as well as dairy products and vegetables. Buddhists can run the gammut of diets.