What: Shares of snack food giant Kraft (NASDAQ:KRFT.DL) leapt 37% during the month of March, according to S&P Capital IQ data. 

KRFT Chart

KRFT data by YCharts

So what: Shareholders can thank none other than investing legend Warren Buffett for those quick gains. His Berkshire Hathaway conglomerate, along with partner 3G Capital, announced a merger of Kraft with the H.J. Heinz Company. The resulting food giant will control eight brands that each account for more than $1 billion of sales per year. "This is my kind of transaction," Buffett said in a press release. "I'm excited by the opportunities for what this new combined organization will achieve."

Now what: Kraft shareholders can expect a one-time special cash dividend of $16.50 per share, or $10 billion total, due to hit their accounts as soon as the merger closes. From that point on, Kraft investors who stick around will own 51% of the newly merged entity. 

Sure, this deal won't fix Kraft's significant business struggles. Those include zero revenue improvement last year on organic sales growth that was below 1%. However, Berkshire and 3G Capital have a stellar track record for long-term ownership of businesses like these. And shareholders should approach their decision on whether to cash out last month's gains with a similar focus on the long term.