pub fn resolve_target(
dir: &Path,
positionals: &[String],
staged: bool,
base: Option<&str>,
lookup: &dyn PrLookup,
) -> Result<Target>Expand description
Works out what the command-line arguments ask to review:
- nothing: on a branch other than the main one, everything that branch changes —
its commits since it split off from the main branch (or
base), plus uncommitted and untracked work; on the main branch, just the uncommitted work; - a GitHub or Azure DevOps PR URL, or
pr <url | number>: that pull request; - a branch: that branch against the default branch (
baseoverrides it), from the point where it branched off — a branch only onoriginis fetched first; a..b/a...b: as ingit diff;- any other revision: that revision against the working tree.