كتاب المغازى
64  
Military Expeditions led by the Prophet (pbuh) (Al-Maghaazi)
(35)
Chapter: The Ghazwa of Al-Hudaibiya
(35)
باب غَزْوَةِ الْحُدَيْبِيَةِ
Sahih al-Bukhari 4156

Narrated Mirdas Al-Aslami:

Who was among those (who had given the Pledge of allegiance) under the Tree: Pious people will die in succession, and there will remain the dregs of society who will be like the useless residues of dates and barley and Allah will pay no attention to them.

حَدَّثَنَا إِبْرَاهِيمُ بْنُ مُوسَى، أَخْبَرَنَا عِيسَى، عَنْ إِسْمَاعِيلَ، عَنْ قَيْسٍ، أَنَّهُ سَمِعَ مِرْدَاسًا الأَسْلَمِيَّ، يَقُولُ ـ وَكَانَ مِنْ أَصْحَابِ الشَّجَرَةِ ـ يُقْبَضُ الصَّالِحُونَ الأَوَّلُ فَالأَوَّلُ، وَتَبْقَى حُفَالَةٌ كَحُفَالَةِ التَّمْرِ وَالشَّعِيرِ، لاَ يَعْبَأُ اللَّهُ بِهِمْ شَيْئًا‏.‏
Reference : Sahih al-Bukhari 4156
In-book reference : Book 64, Hadith 200
USC-MSA web (English) reference : Vol. 5, Book 59, Hadith 476
  (deprecated numbering scheme)