Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) narrates: On the day of al-Hudaybiyah, the Prophet (peace and blessings be upon him) and his Companions shaved their heads, except Sayyiduna Abu Qatadah (may Allah be pleased with him) and Sayyiduna Uthman (may Allah be pleased with him), who did not. The Prophet (peace and blessings be upon him) said: "May Allah Almighty have mercy on those who shave their heads." The people said: "O Messenger of Allah! And on those who shorten their hair as well?" He said: "May Allah Almighty have mercy on those who shave their heads." The people said: "O Messenger of Allah! And on those who shorten their hair as well?" The third time, the Prophet (peace and blessings be upon him) said: "And on those who shorten their hair as well (may He have mercy)."
Imam Ahmad and Imam Abu Ya'la recorded it, and these words are his (Abu Ya'la's). Its chain contains Abu Ibrahim al-Ansari, whom Abu Hatim declared majhul (unknown); the remaining narrators are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الحج / 5602