gerrit style tui patchset diff viewer for github / bitbucket using jj [mirror]
README.md
# diffsoup **A Gerrit-style patchset diff viewer for pull requests, using jujutsu** Anyone who prefers a patch-based workflow rather than the branch-based one used by most git forges will know that these tools are terrible at showing changes between iterations. Diffsoup exists to make rebased and amended pull requests reviewable again, by comparing patchset to patchset on a per-commit basis instead of bundling all changes, including everything coming in from trunk. ## Usage The most common usage is simply: ```sh diffsoup <pull request url> ``` This needs to be run inside a local checkout of the target repository, and you must be able to fetch from its remote via SSH. diffsoup will then fetch the PR history and any commits that do not exist locally, rebase and interdiff those patchsets using jj-lib and present them in a gerrit-style view of each iteration. This way it requires no special support from the forge other than pull request history. ### Configuration and authentication Configuration is done through gitconfig, through user and repo level config, with the same priority as usual. `~/.gitconfig` ```gitconfig # subsection name must match pull request URL [diffsoup "https://git.example.org"] # one of github, gitlab, bitbucket, bitbucket-datacenter forge = gitlab # optional, env used as fallback tokenCommand = pass Token/git.example.org ``` The tool attempts to detect forge automatically from the pull request URL, but manual configuration always takes precedence. Same with authentication, which might be required for accessing pull request history, where the output of tokenCommand is used, with the possibility of overriding it via these env vars: - GitHub: `GITHUB_TOKEN`, with `gh auth token` as a fallback, if `gh` is installed - Gitlab: `GITLAB_TOKEN` - Bitbucket Cloud / Data Center: `BITBUCKET_TOKEN` tokenCommand executes as a shell command, so use with caution, and only in trusted repos. ### Change tracking For reliable tracking across rebases, diffsoup relies on the change-id …