pub async fn upstream(branch: impl AsRef<OsStr>) -> Option<String>Expand description
Returns the qualified name of the remote branch being tracked by the
specified tracking branch, or None if the branch is not a tracking
branch.
ยงExamples
Assuming the local main branch is tracking origin/main:
use grit::git;
async fn assert_main() {
assert_eq!(git::upstream("main").await.as_deref(), Some("origin/main"));
}