(3)In the case of a sentence of imprisonment for a period not exceeding three months and passed under this Act by a court-martial, the appropriate officer under sub- section (1) may direct that the sentence shall be carried out by confinement in military custody instead of in a civil or military prison.