He was right. In the grocery section of the Raynham supercenter, 45 minutes south of Boston, I had trouble believing I was in a Walmart. The very reasonable-looking produce, most of it loose and nicely organized, was in black plastic bins (as in British supermarkets, where the look is common; the idea is to make the colors pop). The first thing I saw, McIntosh apples, came from the same local orchard whose apples I’d just seen in the same bags at Whole Foods. The bunched beets were from Muranaka Farm, whose beets I often buy at other markets—but these looked much fresher. The service people I could find (it wasn’t hard) were unfailingly enthusiastic, though I did wonder whether they got let out at night.

During a few days of tasting, the results were mixed. Those beets handily beat (sorry) ones I’d just bought at Whole Foods, and compared nicely with beets I’d recently bought at the farmers’ market. But packaged carrots and celery, both organic, were flavorless. Organic bananas and “tree ripened” California peaches, already out of season, were better than the ones in most supermarkets, and most of the Walmart food was cheaper—though when I went to my usual Whole Foods to compare prices for local produce, they were surprisingly similar (dry goods and dairy products were considerably less expensive at Walmart).

Walmart holding its own against Whole Foods? This called for a blind tasting.

I conspired with my contrarian friend James McWilliams, an agricultural historian at Texas State University at San Marcos and the author of the new Just Food: Where Locavores Get It Wrong and How We Can Truly Eat Responsibly. He enlisted his friends at Fino, a restaurant in Austin that pays special attention to where the food it serves comes from, as co-conspirators. I would buy two complete sets of ingredients, one at Walmart and the other at Whole Foods. The chef would prepare them as simply as possible, and serve two versions of each course, side by side on the same plate, to a group of local food experts invited to judge.

I started looking into how and why Walmart could be plausibly competing with Whole Foods, and found that its produce-buying had evolved beyond organics, to a virtually unknown program—one that could do more to encourage small and medium-size American farms than any number of well-meaning nonprofits, or the U.S. Department of Agriculture, with its new Know Your Farmer, Know Your Food campaign. Not even Fishman, who has been closely tracking Walmart’s sustainability efforts, had heard of it. “They do a lot of good things they don’t talk about,” he offered.

The program, which Walmart calls Heritage Agriculture, will encourage farms within a day’s drive of one of its warehouses to grow crops that now take days to arrive in trucks from states like Florida and California. In many cases the crops once flourished in the places where Walmart is encouraging their revival, but vanished because of Big Agriculture competition.