Skip to content

gh pr diff #917

Closed
Closed

Description

@vilmibm

Describe the feature or problem you’d like to solve

It's hard to see the changes from a given pull request. You can produce a diff with git but it can
take some trial and error (and it's easy to accidentally diff against the wrong HEAD). github.com
cleanly solves this problem and we have all the same context to solve it in the CLI. Having this
will make code review easier from the command line.

Proposed solution

$ gh pr diff     # produce diff for current branch's PR or a diff of the current branch against what we would open a pr against by default in pr create
$ gh pr diff 123 # produce diff for specific PR

In both cases we'd form the correct call to git diff and hand off to that (potentially dropping
into a pager).

Open Questions

cc @ampinsk

  • In the above example, should it produce the hypothetical diff for a branch not yet associated with
    a pull request? or just error?
  • I couldn't think of any options this would need to take...am I missing anything?

Activity

  1. added
    enhancement
    on May 13, 2020
  2. self-assigned this
    on May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions