Bava Basra1: 2
וְכֵן בְּגִנָּה, מְקוֹם שֶׁנָּהֲגוּ לִגְדוֹר — מְחַיְּבִין אוֹתוֹ. אֲבָל בְּבִקְעָה, מְקוֹם שֶׁנָּהֲגוּ שֶׁלֹּא לִגְדּוֹר — אֵין מְחַיְּבִין אוֹתוֹ. אֶלָּא אִם רוֹצֶה — כּוֹנֵס לְתוֹךְ שֶׁלּוֹ, וּבוֹנֶה, וְעוֹשֶׂה חָזִית מִבַּחוּץ. לְפִיכָךְ, אִם נָפַל הַכֹּתֶל — הַמָּקוֹם וְהָאֲבָנִים שֶׁלּוֹ. אִם עָשׂוּ מִדַּעַת שְׁנֵיהֶן — בּוֹנִין אֶת הַכֹּתֶל בָּאֶמְצַע וְעוֹשִׂין חָזִית מִכָּאן וּמִכָּאן. לְפִיכָךְ, אִם נָפַל הַכֹּתֶל — הַמָּקוֹם וְהָאֲבָנִים שֶׁל שְׁנֵיהֶם.
Similarly, a garden [is treated generally as] a place where they were accustomed to fence off, [and] we obligate him [to do so]. However, a valley [is treated generally as] a place where they were accustomed not to fence off, [and] we do not obligated him [to do so]. Rather, if he desires, he should withdraw into his own [field], build [a fence], and make a mark on the outside. Therefore, if the wall fell, the space and the stones belong to him. If they made [it] by common consent, they build the wall in the middle and make marks on both sides. Therefore, if the wall fell, the place and the stones belong to both of them.