Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) narrates: On the occasion of al-Hudaybiyah, the Prophet (peace and blessings be upon him) called the people to give the pledge of allegiance. Abu Sinan bin Mihsan stood up and said: "O Messenger of Allah! I will pledge allegiance to you on what is in my heart." The Prophet (peace and blessings be upon him) said: "What is in your heart?" He said: "That I keep fighting with my sword in front of you until Allah Almighty grants you victory, or I am martyred." So he pledged allegiance to the Prophet (peace and blessings be upon him) on that, and the people too pledged allegiance in the manner of the pledge of Sayyiduna Abu Sinan (may Allah be pleased with him).
Al-Tabarani recorded it; its chain contains Abd al-Aziz bin Imran, who is matruk (abandoned).