The honest answer is that it depends on three things. Age of the existing roof, extent of the damage, and how long you plan to stay in the house.
If the roof is under fifteen years old and the damage is isolated to one slope, repair almost always wins.
If the roof is past twenty years and you are already seeing granule loss in the gutters, throwing money at a repair is throwing good money after bad.
If you are selling in the next two years, sometimes a fresh roof pays for itself in what it does to the sale price and how fast the house moves.