Catalysis of the reaction: phosphatidylglycerol + phosphatidylglycerol = diphosphatidylglycerol (cardiolipin) + glycerol.