Sayyiduna Anas bin Malik (may Allah be pleased with him) narrates: When the companions of the Prophet (peace and blessings be upon him) were digging the trench, they were saying along with it: "We are those who have pledged allegiance to Muhammad (peace and blessings be upon him) on this matter, that as long as we remain, we will always fight." The Prophet (peace and blessings be upon him) was replying to them: "O Allah! Indeed, true life is only the life of the Hereafter, so forgive the Ansar and the Muhajirin."
Hadith Referenceصحیح ابن حبان / كتاب إخباره ﷺ عن مناقب الصحابة رجالهم ونسائهم بذكر أسمائهم رضوان الله عليهم أجمعين / 7259
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - مضى (5759). تنبيه!! رقم (5759) = (5789) من «طبعة المؤسسة». - مدخل بيانات الشاملة -.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرط مسلم