Why Did Jesus Tell His Disciples to Sell a Cloak and Buy a Sword (Luke 22:36)?

Jesus’ “buy a sword” warning prepared disciples for hostility and fulfilled prophecy, while He immediately rejected violent resistance.