Sahih Muslim
Sahih Muslim 1856 f
It is recommended for the army to swear allegiance to the ruler when intending to fight, and an account of Bay'at Ar-Ridwan beneath the tree
Arabic hadith text
وَحَدَّثَنَا مُحَمَّدُ بْنُ الْمُثَنَّى، وَابْنُ، بَشَّارٍ قَالاَ حَدَّثَنَا مُحَمَّدُ بْنُ جَعْفَرٍ، حَدَّثَنَا شُعْبَةُ، عَنْ عَمْرِو بْنِ مُرَّةَ، عَنْ سَالِمِ بْنِ أَبِي الْجَعْدِ، قَالَ سَأَلْتُ جَابِرَ بْنَ عَبْدِ اللَّهِ عَنْ أَصْحَابِ، الشَّجَرَةِ فَقَالَلَوْ كُنَّا مِائَةَ أَلْفٍ لَكَفَانَا كُنَّا أَلْفًا وَخَمْسَمِائَةٍ .
Translation
It has been narrated on the authority of Salim b. Abu al-Ja'd who said
I asked Jabir b. 'Abdullah about the number of the Companions (of the Prophet who took the oath of fealty under) the tree. He said: If we were a hundred thousand, it (i. e. the water in the well at Hudaibiya) would have sufficed us, but actually we were one thousand and five hundred.