This patch adds a new generic template, template_unit_soldier.xml, which serves as a shared parent for all infantry, cavalry, elephants, champions, and heroes, and possibly more others in the future (e.g. camels). The advantages are:
- it allows removing some duplication from its children;
- it allows removing some things from template_unit.xml and its other children.
The latter point improves mod support: if one would want to introduce a template for e.g. a dragon, hot air balloon, or spacecraft, then the new file would be simpler, having to remove or disable fewer things than under the current situation.
See also this forum post and subsequent replies.
What this patch doesn't do is rename the children of the new template_unit_soldier.xml:
template_unit_cavalry* → template_unit_soldier_* template_unit_champion* → template_unit_soldier_* template_unit_elephant* → template_unit_soldier_elephant* template_unit_hero* → template_unit_soldier_hero* template_unit_infantry* → template_unit_soldier_infantry*
and adjust the parents of the affected units/ files. That will be done in a follow-up patch, which can be committed later. This is intentional, to focus this one on the actual clean-up and keep it more easily reviewable.