One way to understand our current military justice system is to read the sections in the Army Act of 1950 dealing with “offences in relation to the enemy and punishable with death” relating to warlike situations. Samples: “shamefully” abandoning a garrison or a defence position, casting away arms, cowardice, assisting the enemy, putting up the white flag of surrender, spreading rumours that may create alarm, a sentry who “sleeps upon his post or is intoxicated” in times of war.
Independent India has got no soldier executed; that does not mean we have not had cowardice or desertion in times of war, or sentries who fell asleep. All it does is to tell us how antiquated the law is. The colonial ring of its language, and some provisions, date many of its provisions to the 1911 Indian Army Act.