“As for you, you shall go to your fathers in peace; you shall be buried at a good old age.” (Bereishit 15:15)
Rashi comments: “His father [Terach] was an idolater — yet Hashem tells him that he will go to be gathered to him? This comes to teach that Terach repented (did teshuvah).”
All the commentators raise a question: how can this verse serve as proof that Terach repented? If that were the verse’s intent, it should have said, ‘You shall go to your father in peace’, not ‘to your fathers’ in the plural. And if the intention were to tell us that all of Abraham’s ancestors repented, then Rashi would have had no reason to single out Terach alone. For if they had all repented, why mention only him?
This can be explained as follows. The Talmud (Sanhedrin 103a) teaches, “A son brings merit to his father” (“Bera mezakeh abba”). Based on this principle, if the verse had said, “You shall go to your father in peace,” we might have assumed that Abraham could go in peace to Terach even if Terach himself had not repented—thanks to the merit that Abraham, his righteous son, brings to Terach.
However, since the verse says, “You shall go to your fathers in peace,” in the plural, and we have no tradition that all of his forefathers had repented, we cannot attribute this peace merely to Abraham’s merit. The merit of a son extends only to his father, not to his grandfather.
It follows, therefore, that Terach must have repented, and by doing so he brought merit also to his own father. This explains why the verse so precisely says that Hashem told Abraham, “You shall go to your fathers in peace” — in the plural — because both Terach and his father attained peace and tranquility: Terach, through his repentance; and Terach’s father, through the merit of his son, for indeed, “A son brings merit to his father.”
[According to these words of Rabbeinu, the Zera Shimshon, Rashi’s difficulty — “His father [Terach] was an idolater, and yet He tells him that he will go to be gathered to him?” — does not concern Terach alone, but all the ancestors included in the plural “your fathers.” Rashi’s question was: what consolation is there in telling Abraham that he will be gathered to idolatrous ancestors? The answer: that Terach repented, and in so doing also benefited his own father, Abraham’s grandfather. Therefore, the Torah fittingly says “to your fathers,” in the plural, to include both Terach and his father.]
(Zera Shimshon, Parashat Lech Lecha, art. 18)