I understand if you were in a mercenary company or a citizen militia (like in Classic Greece or pre-Marian Rome, or the landsknecht) you'd own the swords, the shields, and the armours since you'd likely had bought them at a market before joining the war.
What if you were a soldier in a state owned professional army, like say, Roman Legion under Diocletian, or Chinese army under Tang Xuanzong?
Would you have brought your own weapons before signing up, or did the army issue standard weapons and armours?
Did you have to return them before leaving the service? Would you have had to pay for the repairs out of your own pocket?
State owned professional armies were the exception rather than the rule for the vast majority of human history. One of the more famous aversions in the western world is the post Marian Roman army and there is a good discussion of that archived here.
There were two primary contributors one seems to have deleted there account but /u/Agrippa911 gave some good stuff just south of the initial answer.