"And Isaac sent them away" (Genesis 26:31). Isaac was riding upon a donkey when he cut a covenant with them, and he cut from the bridle of the donkey the measure of a cubit, so that it would serve him as evidence that Isaac had sworn that his children would not take from the land of the Philistines for all time. And therefore it is said of David: "And David took the bridle of the cubit (Metheg-Ammah) from the hand of the Philistines" (II Samuel 8:1).
Isaac's Donkey Bridle and David's Capture of Metheg-Ammah
Midrash Aggadah, Genesis 26:31
וישלחם יצחק. היה רוכב יצחק על חמור כשכרת עמהם ברית, וחתך ממתג החמור שיעור אמה, כדי שיהיה לו לראייה שנשבע יצחק שלא יקחו בניו מארץ פלשתים כל הימים, ולכך נאמר בדוד ויקח [דוד] את [מתג] האמה מיד פלשתים (ש"ב ח א):