@sg, you have raised a very interesting legal question in your original post. The key is how you have worded your prayers and not what allegations and demands you have avered in your petition. There are several Supreme Court Judgments that state that you can only get relief that you have specifically prayed for. For example, Manoharlal (Dead) by LRs vs.Ugrasen (Dead) by LRs and others, (2010) 11 SCC 557. So, first, make sure that your prayers in your petition are worded correctly and specifically asks for child custody.
Also, while praying for a relief that you want is mandatory, just because you have prayed for a relief, does not mean that the Judge will rule on it!
So, how do you ensure that you get a judgment on an issue that you have prayed for, e.g., custody? Well, somewhere during the four or five years period, now that the Judge wants to hold arguments, the Judge must have framed the issues. FRAMING OF ISSUES is a critical phase and is based upon prayers in the petition or applications filed, though strictly speaking, applications must be connected to prayers in the petition. If an issue, such as child custody, was not framed, then you need to approach the Judge and file an application to frame that as an issue. I am not too sure if there are any time restrictions for doing so. In any event, the earlier the better.
As for who gets custody, thats a question which requires the Judge to take many parameters into consideration. Admittedly, I am not qualified to comment on that subject. However, if the Judge has framed divorce and child custody as two issues then he will certainly rule on them. Neither the Judge nor your husband cannot hold a judgment on divorce in limbo until you consent to giving up custody!
Hope this helps... I am not an advocate and advocates in this forum like to pounce on me because I point out significant points that they miss or do not understand/know!