(a) In the organized militia not in federal service, the processes and sentences of its courts-martial when issued may be executed by the civil officers prescribed by the laws of the state.
(b) When the sentence of a court-martial adjudges confinement and the reviewing authority has approved the sentence in whole or in part, the reviewing authority or the commanding officer for the time being, as the case may be, shall issue a warrant of commitment to the sheriff of the county in which the court-martial was held directing the sheriff to take the body of the person so sentenced and confine him or her in the county jail of the county for the period named in the sentence, as approved, or until he or she may be directed to release him or her for proper authority. The confinement shall be carried out as prescribed for confinement in jail by the code of criminal procedure of this state.