Sherman operated under GO 100 - in pertinent part (paras 15 & 17 being determinative):

14. Military necessity, as understood by modern civilized nations, consists in the necessity of those measures which are indispensable for securing the ends of the war, and which are lawful according to the modern law and usages of war.

15. Military necessity admits of all direct destruction of life or limb of armed enemies, and of other persons whose destruction is incidentally unavoidable in the armed contests of the war; it allows of the capturing of every armed enemy, and every enemy of importance to the hostile government, or of peculiar danger to the captor; it allows of all destruction of property, and obstruction of the ways and channels of traffic, travel, or communication, and of all withholding of sustenance or means of life from the enemy; of the appropriation of whatever an enemy's country affords necessary for the subsistence and safety of the Army, and of such deception as does not involve the breaking of good faith either positively pledged, regarding agreements entered into during the war, or supposed by the modern law of war to exist. Men who take up arms against one another in public war do not cease on this account to be moral beings, responsible to one another and to God.

16. Military necessity does not admit of cruelty--that is, the infliction of suffering for the sake of suffering or for revenge, nor of maiming or wounding except in fight, nor of torture to extort confessions. It does not admit of the use of poison in any way, nor of the wanton devastation of a district. It admits of deception, but disclaims acts of perfidy; and, in general, military necessity does not include any act of hostility which makes the return to peace unnecessarily difficult.

17. War is not carried on by arms alone. It is lawful to starve the hostile belligerent, armed or unarmed, so that it leads to the speedier subjection of the enemy.
On the other hand, "war crimes" and associated death penalties were not limited to the "losing side":

44. All wanton violence committed against persons in the invaded country, all destruction of property not commanded by the authorized officer, all robbery, all pillage or sacking, even after taking a place by main force, all rape, wounding, maiming, or killing of such inhabitants, are prohibited under the penalty of death, or such other severe punishment as may seem adequate for the gravity of the offense. A soldier, officer, or private, in the act of committing such violence, and disobeying a superior ordering him to abstain from it, may be lawfully killed on the spot by such superior.
....
47. Crimes punishable by all penal codes, such as arson, murder, maiming, assaults, highway robbery, theft, burglary, fraud, forgery, and rape, if committed by an American soldier in a hostile country against its inhabitants, are not only punishable as at home, but in all cases in which death is not inflicted the severer punishment shall be preferred.
QED.

Regards

Mike