The Prophet ﷺ said, "Whoever swears an oath must swear only by Allah." Quraysh used to swear by their forefathers, so he said, "Do not swear by your forefathers."
حدثنا علي بن بحر حدثنا صالح بن قدامة بن إبراهيم بن محمد بن حاطب الجمحي أبو محمد حدثني عبد الله بن دينار
عن النبي ﷺ قال من كان حالفا فلا يحلف إلا بالله وكانت قريش تحلف بآبائها قال فلا تحلفوا بآبائكم
Its isnad is sahih. Husayn bin Muhammad is Marwazi, the teacher of Ahmad. Ali bin Bahr bin Barri Qattan, his reliability was established earlier at 865, and we add here that Ibn Abu Hatim included his biography in al-Jarh wal-Tadil 3/1/176, quoting his father's confirmation of his reliability. He was a contemporary of Ahmad, and Ahmad narrated from him many times, so Husayn bin Muhammad's narration from him here is an instance of an elder transmitting from a younger one.Salih bin Qudama bin Ibrahim bin Muhammad bin Hatib Qurashi Jumahi is trustworthy. Nasai said, "There is no harm in him," and Ibn Hibban listed him among the trustworthy. Bukhari included his biography in al-Kabir 2/2/289, and said, "His grandmother was Ayesha bint Qudama bin Mazun."This hadith is a repetition of 5462, and see also 5593.