This is an expression mostly used in informal contexts. When you `go the whole hog’, you do something thoroughly; you do not compromise in any way. It has the same meaning as `go all the way’. Americans tend to say `go whole hog’.
*When the mechanic told me how much it would cost to repair the old car, I decided to go whole hog and buy a new one instead. *Gayathri went the whole hog and bought matching slippers and earrings to go with her new dress.
According to one theory, the `hog’ in the idiom doesn’t refer to a pig, but to money. In the 18th Century, the word `hog’ was a slang term for `shilling’. So when you went the whole hog, you spent the entire shilling at once. The expression became popular in the United States when Andrew Jackson ran for President in 1828. This gave rise to the expression `whole hogger’ to mean someone who would see a matter through, come what may!