What is built: ref, or its remote branch (origin/stable) when the local branch is behind it.
origin/stable
final String resolvedRef;