In the end, they got it done.

After going down to the wire on passing the U.S. military budget for fiscal 2015 (a budget that, by law, really ought to have been passed by Oct. 1), Congress finally approved the National Defense Authorization Act for Fiscal Year 2015 (the "NDAA") last month. On Dec. 19, President Barack Obama signed it into law.

The USS George Washington was saved by the bell -- and by Congress. Photo source: U.S. Navy.

But not before some last-minute tinkering.

Avert your eyes: Congress is making the sausage.
As reported, "nearly 10 percent" of the Pentagon's requested funds were shifted around within the "cromnibus" appropriations bill (signed Dec. 16) funding items authorized by the military budget. What's more, lawmakers tweaked a full 35% of the 812 "budget lines" for procurement that received funding, providing either more or less money than the generals said they actually needed.

In all, 229 essential military budget items received less money than the Pentagon said they require, while 60 programs received additional funding -- resulting in $4 billion more being directed for defense than either the president or the Pentagon asked for. In total, the cromnibus allocated $521.3 billion to the "base" military budget, with an additional $63.7 billion in supplemental funds for foreign contingency operations -- so $585 billion in all.

Who won?
Huntington Ingalls (NYSE:HII): The defense contractor overseeing the refueling of the nuclear-powered aircraft carrier USS George Washington will benefit from $843 million allocated to the carrier's refurbishment. This is really a double-win for Huntington Ingalls, considering that legislators until recently had discussed deactivating the carrier, rather than refueling it and sending it back to sea.

General Dynamics: Congress appropriated $120 million to buy M1 Abrams main battle tanks for the Army -- tanks the Army has said it doesn't need, but which must be built if General Dynamics is to keep its tank-building factories operational.

Northrop Grumman: Northrop, which has overall responsibility for maintaining Air Force A-10 Thunderbolt "Warthog" combat jets, and Boeing (NYSE:BA), which is putting new wings on older A-10s, benefited from a last-minute decision to fund the aircraft. The A-10 program will get $337 million to keep flying for another year.

The Navy depends on its "Growler" electronic warfare aircraft to keep other fighters safe. Photo source: Wikimedia Commons.

And who lost out?
Boeing again:
Boeing also hoped to sell the Navy 22 EA-18G electronic warfare aircraft for $2.14 billion. Instead, the Navy will get just 15 "Growlers" -- and Boeing will get $680 million less revenue. On the plus side, Boeing now has enough business to keep production lines for the plane open through 2017.

Lockheed Martin (NYSE:LMT): Lockheed received funding for every single F-35 fighter jet the Pentagon asked for, and an additional $1.6 billion for research and development on the still-in-development fighter jet. Some might consider that a win. But Lockheed investors had high hopes that Congress would eliminate funding for the A-10 fighter entirely, shifting those hundreds of millions over to buying more F-35s. As losses go, this was a slight one for Lockheed Martin.

And hey, there's always next year...

The big takeaway for investors
Here at The Motley Fool, we're as interested as anyone else in keeping up with events in Washington -- but what we really enjoy is figuring out how such developments affect investors' portfolios. In that regard, the single biggest takeaway from the 2015 military budget is the one we started out with.

While in dollar terms, the $7 billion-plus allocated to Lockheed Martin's F-35 program is certainly impressive, Congress' decision to proceed with nuclear refueling for the USS George Washington is even more significant for Huntington Ingalls. It means more than just hundreds of millions of dollars in extra revenue. It means Huntington Ingalls is likely to reap the full benefits of the project, which will take several years and $3 billion to complete.

For Huntington Ingalls, one of America's smallest pure-play defense contractors at just $5.5 billion in market cap, securing a $3 billion pipeline of work is a very big deal. It suggests 2015 could be a very good year for Huntington Ingalls.

And did we mention? Huntington Ingalls has another aircraft carrier project up its sleeve: Introducing the $17.5 billion  USS Gerald R. Ford (CVN-78). Photo source: Wikimedia Commons.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.