resolveGitRepoInfo
Like resolveGitRepoInfo, but remoteOverride (when non-blank) replaces the git origin URL — normalized from SSH/HTTPS to https://host/org/repo. The source root and revision come from the history selected by gitOwnership. CHECKOUT ignores .gitrepo synchronization metadata; SUBREPO_UPSTREAM explicitly selects that metadata's upstream and imported commit. Backs the repo DSL.
Like the two-argument resolveGitRepoInfo, but additionally accepts commitOverride — when non-blank it replaces the checkout's HEAD commit in the returned GitRepoInfo. This backs the DSL repo { commit = … } property, used when the local HEAD has not been pushed to the remote and generated source-browse links would 404.
Like the three-argument resolveGitRepoInfo, but accepts a CommitRef enum strategy instead of (or in addition to) a literal commit string. When commitRef is non-null it takes priority over commitOverride:
CommitRef.HEAD — uses the checkout's HEAD (same as the default when both are null).
CommitRef.PARENT — reads
refs/remotes/origin/master(or…/main) from the local git database, yielding the last fetched commit on the remote default branch — i.e. the commit from which the local analysis branch was created.
With SUBREPO_UPSTREAM, HEAD and PARENT both retain the recorded imported commit. The enclosing checkout belongs to another repository and cannot supply that import's revision. The enum approach avoids hard-coding commit SHAs or branch names in the DSL.