I have read about the beginnings of modern "total war" in which civilians and civilian infrastructure are regarded as legitimate targets. There was Sherman's March to the Sea, British policy in the Boer Wars, unrestricted U-boat attacks, etc. all culminating in the Second World War.
The suggestion seems to be that, before this modern development, warfare was somehow more civilized. But this does not fit with what I know of medieval warfare, which appears to be full of massacres, bloody sieges and razing.
Is "total war" really a modern invention?
The distinction between modern 'total war' and earlier types of war is not to do with how civilised war was, I think this is a common misconception. Rather the key aspect of total war (which is best exemplified in the world wars, but has its origins in the French revolution) is that a whole society is mobilised for the war (and thus fights against the whole society of the opposing force), rather than just the military class, and in this sense it was different from medieval European war.
In medieval societies, it simply was not possible to mobilise a very large proportion of the population for war, due to the large demands of armies for supplies and the basic logistics of the time. Before the military revolution in early modern Europe no European ruler had more than a few tens of thousands of men under his command, while by the time of Louis XIV this had increased to the low hundreds of thousands (van Creveld 1999: 242). For comparison the population of France in in 16th and 17th centuries was about 20 million, making the proportion of the population mobilised 0.1% to 0.75%. Napoleon invaded Russia with 550,000 French soldiers (1.8% of the French population of 30 million), while at the apogee of total war in the 20th century, around 3 million German troops took part in Operation Barbarossa in 1941, out of a total German population of 80 million (3.75% of the population). Additionally, the new vast armies with their equally vast demands for weaponry, equipment and logistical support required a much larger proportion of the civilian population to provide this, and as the economy became vital to the war effort, it (meaning its workers) became a target.
Ideologically, total war mobilised the entire nation, while war prior to this was fought between monarchs for personal possession of territory, and was fought mostly by aristocrats and mercenaries. "The duty of the subject in such regimes, other than those specifically charged with military duties, was obedience and tranquillity, not loyalty or zeal. Frederick the Great indignantly refused the offer of his loyal Berliners to help him defeat the Russians who were about to occupy his capital (Hobsbawm 1992: 75). The French revolution enabled the state to wage war with the full power of the nation, according to Clausewitz (van Creveld 1999: 245), and thus the whole society was nominally at war, not just the king, inaugurating a new era of war in which all of society was at least nominally involved.
Behind these changes (economic, organisational, and ideological) was the increasing power of the state, e.g. its ability to enforce conscription and control or intervene in the economy to ensure it served military goals. In the medieval period the state (really the monarch, as there was no state in the modern sense) was remote from the lives of most people, in peace and in war. However in the total wars of the 20th century, the state was able to direct the whole of society in the service of its military goals.