If you besiege a city for a long time, fighting against it to capture it, do not destroy its trees by swinging an axe against them, for you may eat their fruit — do not cut them down. Are the trees of the field human, that you should besiege them too?
In context
17You must devote them to complete destruction — the Hittites, Amorites, Canaanites, Perizzites, Hivites, and Jebusites — as Yahweh your God has commanded you, 18so that they do not teach you to imitate all the detestable things they have done for their gods, causing you to sin against Yahweh your God. 19If you besiege a city for a long time, fighting against it to capture it, do not destroy its trees by swinging an axe against them, for you may eat their fruit — do not cut them down. Are the trees of the field human, that you should besiege them too? 20Only the trees you know do not produce food may you destroy and cut down, to build siege works against the city that is waging war against you, until it falls.