"Glen Choo via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes: > Signed-off-by: Glen Choo <chooglen@xxxxxxxxxx> Add a note in the commit message that this will be used and tested in a subsequent patch. > - if (argc || !clone_data.url || !clone_data.path || !*(clone_data.path)) > + if (argc || !clone_data.url || !clone_data.path || !*(clone_data.path) > + || (!!clone_data.branch != !!clone_data.branch_oid)) > usage_with_options(git_submodule_helper_usage, > module_clone_options); I know that this is just internal code, but could we have a better diagnostic? You can leave the existing check alone, and then do the !!clone_data.branch != !!clone_data.branch_oid with a BUG() if the result is not what you expect.