Transfer Custody From Improper to Proper Person. In cases where any party is held under illegal restraint or custody, but any other person is entitled to the restraint or custody of such party, the court may order such party to be committed to the restraint or custody of such person as by law entitled thereto. NOTE: Section 135.50 is substantively the same as former § 1493. See also Cal. Pen. Code § 1493 (same). These statutory provisions, as well as California's, on their face deal only with complete relief, i.e., the person is either remanded to custody or discharged (except for release on bail or other conditions in criminal matters). In fact, the person may be remanded but any illegal restraints may be ordered removed. This
COL120106
Adeclaration of rights@ procedure is a case law development which does not, however, find expression in the statute. See B. Witkin, California Procedure Habeas Corpus and Other Extraordinary Writs §§ 798-790 (1963, Supp. 1973).