Here's a study on the effects of dietary garlic and onion, raw or heat processed, in mice eating a gallstone-promoting diet. It was done by the same researchers who subsequently did another study on garlic and onion on pre-established gallstones in mice. The difference between the 2 studies being that this one examined mice eating a lithogenic diet, while the other one was done on mice who *had eaten* (but stopped) the lithogenic diet.
As we can see, gallstones still formed on the lithogenic ("stone forming") diet even with the addition of garlic or onion, but less so. The effect was apparently greatest in the group receiving heat-processed onion, but I think it's wise to include in one's diet a variety of onion and garlic, raw and cooked.
Blood cholesterol also decreased compared to the lithogenic diet.
--------------------------------
Dietary garlic and onion reduce the incidence of atherogenic diet-induced cholesterol gallstones in experimental mice.
Mice fed with diet containing 0.5 % cholesterol for 10 weeks resulted in cholesterol supersaturation in gallbladder bile which promoted the formation of cholesterol gallstones (CGS). In this study, dietary hypocholesterolaemic spices, garlic and onion (both raw or heat-processed) were examined for their antilithogenic potential by including at 0.6 and 2.0 % level, respectively, along with lithogenic (LG) diet for 10 weeks. Dietary garlic and onion reduced the CGS incidence by 15-39 %, the effect being maximum in the heat-processed onion group. Dietary garlic and onion markedly reduced biliary cholesterol. The cholesterol:phospholipid ratio which was 1.58 in the LG diet group was reduced to 0.73-0.96 in the garlic and onion groups. The biliary cholesterol saturation index was 0.92, 1.25, 1.09 and 0.86, respectively, in the heat-processed onion, raw garlic, heat-processed garlic and raw onion groups, while it was 1.9 in the LG group. The hydrophobicity index of bile was - 0.08, - 0.079, - 0.032 and - 0.073, respectively, in the heat-processed onion, raw garlic, heat-processed garlic and raw onion groups, while it was +0.054 in the LG group. Hepatic hydroxymethyl glutaryl-CoA reductase activity was lowered in the LG diet-fed group, while dietary garlic or onion countered this alteration and also increased the activities of hepatic cholesterol 7 alpha-hydroxylase and sterol 27-hydroxylase. Serum and liver cholesterol were decreased by feeding garlic or onion compared to the LG diet. Thus, dietary Allium spices exerted antilithogenic influence by decreasing the cholesterol hyper-secretion into bile and increasing the bile acid output thus decreasing the formation of lithogenic bile in experimental mice.
http://www.ncbi.nlm.nih.gov/pubmed/18983715