Sahih Muslim 1858a
It has been narrated on the authority of Ma'qil b. Yasar who aaid: I remember being present on the Day of the Tree, and Prophet ﷺ was taking the oath of the people and I was holding a twig of the tree over his head. We were fourteen hundred (in number). We did not take oath to the death, but to the effect that we would not run away from the battlefield.
وَحَدَّثَنَا يَحْيَى بْنُ يَحْيَى، أَخْبَرَنَا يَزِيدُ بْنُ زُرَيْعٍ، عَنْ خَالِدٍ، عَنِ الْحَكَمِ بْنِ عَبْدِ اللَّهِ، بْنِ الأَعْرَجِ عَنْ مَعْقِلِ بْنِ يَسَارٍ، قَالَ لَقَدْ رَأَيْتُنِي يَوْمَ الشَّجَرَةِ وَالنَّبِيُّ ﷺ يُبَايِعُ النَّاسَ وَأَنَا رَافِعٌ غُصْنًا مِنْ أَغْصَانِهَا عَنْ رَأْسِهِ وَنَحْنُ أَرْبَعَ عَشْرَةَ مِائَةً قَالَ لَمْ نُبَايِعْهُ عَلَى الْمَوْتِ وَلَكِنْ بَايَعْنَاهُ عَلَى أَنْ لاَ نَفِرَّ .