Skip to main content

current_upstream_reference

Function current_upstream_reference 

Source
pub async fn current_upstream_reference(
    repo_path: PathBuf,
) -> Result<String, String>
Expand description

Re-exported commit/sync/diff APIs. Returns the current upstream reference for HEAD.

§Arguments

  • repo_path - Path to the git repository or worktree

§Returns

The configured upstream reference, for example origin/main.

§Errors

Returns an error when upstream tracking information cannot be resolved.