llvm-project
4144cedb - [GitHub] Add gh-pr-diff to facilitate using 'git diff' for PRs

Commit
36 days ago
[GitHub] Add gh-pr-diff to facilitate using 'git diff' for PRs For example: ``` $ cd llvm-project.git $ gh-pr-diff --color-words 171453 $ gh-pr-diff --color-words 174293 llvm/docs/LangRef.rst ``` The original motivation for the new script is to facilitate reviewing PRs that reflow text, such as the above PRs. `--color-words` has been a `git diff` option for many years and makes it much easier to read the associated diffs. However, GitHub does not currently support `--color-words` functionality, so this script makes it quick to fetch the PR and view it locally with `git diff`. That concern was raised for [documentation files in an RFC](https://discourse.llvm.org/t/rfc-remove-80-column-limit-in-documentation-files/89678), which proposes generally reformatting documentation files to avoid the GitHub limitation. Even if the RFC is accepted, the new script should help with cases the RFC does not address, such as reflowed C++ source code comments. But this script is more general than reflowed text. It facilitates using any `git diff` option to examine a GitHub PR.
Author
Parents
Loading