> +
> + if (submodule) {
> + refs->submodule = xstrdup_or_null(submodule);drop the _or_null here? So in this patch we have either * submodule set * or gitdir/gitcommondir set which means that we exercise the commondir for regular repos. In the future when we want to be able to have a combination of worktrees and submodules this ought to be possible by setting submodule != NULL and still populating the gitdir/commondir buffers. Thanks, Stefan

