Sahih al-Bukhari, Book 56, Hadith 183 (Bukhari 2852)

Narrated Tha`laba bin Abi Malik Al-Qurazi:

When Qais bin Sa`d Al-Ansari, who used to carry the flag of the Prophet, intended to perform Hajj, he combed his hair.