Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:3964ʿAlī b. ʿAbdullāh > Katabt > Yūsuf b. al-Mājishūn > Ṣāliḥ b. Ibrāhīm from his father

(the grandfather of Salih bin Ibrahim) the story of Badr, namely, the narration regarding the sons of 'Afra'.  

البخاري:٣٩٦٤حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ اللَّهِ قَالَ كَتَبْتُ عَنْ يُوسُفَ بْنِ الْمَاجِشُونِ عَنْ صَالِحِ بْنِ إِبْرَاهِيمَ عَنْ أَبِيهِ

عَنْ جَدِّهِ فِي بَدْرٍ يَعْنِي حَدِيثَ ابْنَىْ عَفْرَاءَ