src pr diff

Show the diff of a pull request using git.

If no PR number is specified, the command will attempt to find a PR
associated with the current branch.

By default uses three-dot diff (git diff target...source) which compares
against the merge-base between the PR source and target branches.
Use --two-dots for a simple two-dot diff (git diff target..source).

Any arguments after -- are passed directly to git diff (e.g., --name-only).

Usage

src pr diff [<number>] [-- <git-diff-args>...] [flags]

Examples

Show diff of a pull request from active branch

src pr diff

Show diff of a pull request

src pr diff 1234

Show diff of a pull request from another repo

src pr diff 1234 -R myorg/myrepo

Show only file names changed (passing git arguments)

src pr diff -- --name-only

Show diff stats

src pr diff 123 -- --stat

Flags

Flag Description
--two-dots Use two-dot diff instead of three-dot (merge-base) diff

Inherited flags

Flag Description
--env string Override Sourcecraft environment (use 'src envs' to list available)
--json string Output JSON, optionally filtered (--json or --json=field1,field2)
--json-compact string Output compact JSON, optionally filtered
--plain Output without colors/styling (for LLM consumption)
-R, --repo string Select another repository using OWNER/REPO format
-V, --verbose Enable debug logging output

Learn more

Use src pr diff <subcommand> --help for more information about a command.

Предыдущая
Следующая