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
وَحَدَّثَنَا عُثْمَانُ بْنُ أَبِي شَيْبَةَ، وَإِسْحَاقُ بْنُ إِبْرَاهِيمَ، قَالَ إِسْحَاقُ أَخْبَرَنَا وَقَالَ، عُثْمَانُ حَدَّثَنَا جَرِيرٌ، عَنِ الأَعْمَشِ، حَدَّثَنِي سَالِمُ بْنُ أَبِي الْجَعْدِ، قَالَ قُلْتُ لِجَابِرٍ كَمْ كُنْتُمْ يَوْمَئِذٍ قَالَ أَلْفًا وَأَرْبَعَمِائَةٍ .
It has been narrated (through a different chain of transmitters) on the authority of Salim b. al-Ja'd who said: I asked Jabir: How many were you on the Day of Hudaibiya? He said: One thousand and four hundred.