{"id":13702678,"url":"https://github.com/speedyleion/gh-difftool","last_synced_at":"2025-05-05T04:31:19.010Z","repository":{"id":60952015,"uuid":"547001641","full_name":"speedyleion/gh-difftool","owner":"speedyleion","description":"A difftool implementation for use with gh cli","archived":false,"fork":false,"pushed_at":"2025-04-26T03:37:59.000Z","size":386,"stargazers_count":13,"open_issues_count":11,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-26T04:41:01.243Z","etag":null,"topics":["cli","gh-extension","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/speedyleion.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-10-07T01:45:16.000Z","updated_at":"2025-01-09T23:13:56.000Z","dependencies_parsed_at":"2023-12-03T05:26:24.887Z","dependency_job_id":"773f1a90-9e2d-451b-8aa5-b1bc4ad5df9e","html_url":"https://github.com/speedyleion/gh-difftool","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speedyleion%2Fgh-difftool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speedyleion%2Fgh-difftool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speedyleion%2Fgh-difftool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speedyleion%2Fgh-difftool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/speedyleion","download_url":"https://codeload.github.com/speedyleion/gh-difftool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252439583,"owners_count":21748038,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","gh-extension","rust"],"created_at":"2024-08-02T21:00:40.623Z","updated_at":"2025-05-05T04:31:18.581Z","avatar_url":"https://github.com/speedyleion.png","language":"Rust","funding_links":[],"categories":["cli","Tool"],"sub_categories":[],"readme":"# gh-difftool\n\nA difftool extension to the GitHub CLI, [gh](https://cli.github.com/).\n\nLaunches a difftool to show the differences of a pull request. The files\nwill be created in a temporary directory with the base branch version of the\nfiles prefixed with `base_`.\n\n```shell\nUsage: gh-difftool [OPTIONS] [PR] [-- \u003cFILES\u003e...]\n\nArguments:\n  [PR]\n          The pull request to diff\n          \n          When omitted the pull request associated with the current branch will be used\n          A pull request can be supplied as argument in any of the following formats:\n          - by number, e.g. \"123\"\n          - by URL, e.g. \"https://github.com/OWNER/REPO/pull/123\"\n\n  [FILES]...\n          Specific files to diff.\n          \n          When not provided all of the files that changed in the pull request will be diffed\n\nOptions:\n  -t, --tool \u003cTOOL\u003e\n          The tool to use for diffing\n          \n          [env: GH_DIFFTOOL=]\n\n  -R, --repo \u003cOWNER/REPO\u003e\n          The GitHub repo to diff, defaults to the GitHub remote of the current git repo\n\n      --name-only\n          Show only the names of files that changed in a pull request\n\n      --rotate-to \u003cROTATE_TO\u003e\n          Start showing the diff for the given file, the files before it will move to end.\n          \n          Applied before `--skip-to`. This behavior deviates from `git-difftool` which\n          seems to ignore rotation when `--skip-to` is present.\n\n      --skip-to \u003cSKIP_TO\u003e\n          Start showing the diff for the given file, skipping all the files before it\n\n  -h, --help\n          Print help information (use `-h` for a summary)\n\n  -V, --version\n          Print version information\n```\n\nWith no args, the tool will try to diff the current branch's pull request.\n\nWhen provided a pull request number or URL will diff that pull request. When\nprovided a repo (requires a pull request number), will diff that repo's pull\nrequest.\n\nFor instance one can do the following from any cloned GitHub repo\n\n```shell\ngh difftool --repo speedyleion/gh-difftool 10\n```\n\n## Installation\n\nThis can be installed like any other GitHub CLI extension,\n\u003chttps://docs.github.com/en/github-cli/github-cli/using-github-cli-extensions\u003e\n\n```shell\ngh extension install speedyleion/gh-difftool\n```\n\nCurrent installs support:\n\n- x86_64 Linux\n- arm64 Android\n- x86_64 Mac\n- arm64 Mac\n- x86_64 Windows\n\n## Configuration\n\nBy default, the tool to use will be derived from the current git configuration\n\u003chttps://git-scm.com/docs/git-difftool\u003e. The `diff.tool` git configuration\noption will be used to determine the tool. Similar to git, if `diff.tool` is\nnot set then `merge.tool` will be used. Unlike git, if neither option is set\n`gh-difftool` will report an error.\n\nAlternatively one can specify a tool to use via the command line argument `-t,\n--tool` or by the environment variable `GH_DIFFTOOL`.\n\nThere are a handful of known difftools available in `gh-difftool`, (bc, bc3,\nbc4, meld, gvimdiff). These known tools assume that the executable is available\nin the `PATH`.\n\n\u003e Note: `gh-difftool` does *not* support the `difftool.trustExitCode` git\n\u003e config option. Exit codes are not trusted.\n\n### Tool Path\n\nWhen the difftool is not in the `PATH`, it can be specified via\nthe `difftool.\u003ctool\u003e.path` git config option.\n\n```ini\n[difftool.sometool]\n    path = /path/to/some/difftool\n```\n\n### Tool Command\n\nIf your difftool of choice is not supported you can explicitly\nuse the `difftool.\u003ctool\u003e.cmd` option.\n\n```ini\n[difftool.sometool]\n    cmd = /path/to/some/unsupported/difftool --extra-arg=foo $LOCAL $REMOTE\n```\n\nThe `$LOCAL` and `$REMOTE` variables will be replaced with the paths to the\nlocal and remote temporary files.\n\nUnlike the standard git difftool, the\n[`difftool.\u003ctool\u003e.cmd`](https://git-scm.com/docs/git-difftool#Documentation/git-difftool.txt-difftoollttoolgtcmd)\nused with `gh-difftool` will *not* be run in a shell.\n\nThis means:\n\n- Only the `$LOCAL` and `$REMOTE` variables will be replaced.\n- the `$LOCAL` and `$REMOTE` variables need to be space separated.\n  Use `--local $LOCAL`, not `--local=$LOCAL`.\n\n## Requires\n\n- The GitHub CLI, [gh](https://cli.github.com/)\n- The [patch](https://www.man7.org/linux/man-pages/man1/patch.1.html) utility\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeedyleion%2Fgh-difftool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeedyleion%2Fgh-difftool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeedyleion%2Fgh-difftool/lists"}