I asked Salama bin Akwa, "On what did you pledge allegiance to the Prophet ﷺ on the day of Hudaybiyyah?"He replied, "On death."
أخبرنا قتيبة قال حدثنا حاتم بن إسمعيل
قلت لسلمة بن الأكوع على أي شيء بايعتم النبي ﷺ يوم الحديبية قال على الموت
Etc, hadith: 4169. Muslim, chapters of transmission, Bukhari narrated it, campaigns, chapter on the campaign of Hudaybiya, leadership, chapter on the desirability of the commander taking the pledge from the army when intending to fight, etc, hadith: 1860, from Qutayba, from him, and it is also in Kubra, hadith: 7780.