{"id":15599120,"url":"https://github.com/fluffynuts/diff-buddy","last_synced_at":"2025-02-24T11:16:42.653Z","repository":{"id":66060460,"uuid":"470176226","full_name":"fluffynuts/diff-buddy","owner":"fluffynuts","description":null,"archived":false,"fork":false,"pushed_at":"2023-02-28T15:23:54.000Z","size":134,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-06T16:48:12.831Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluffynuts.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2022-03-15T13:39:14.000Z","updated_at":"2022-04-22T09:05:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"9f881b75-8e72-4ff0-a795-6575b402a47e","html_url":"https://github.com/fluffynuts/diff-buddy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fdiff-buddy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fdiff-buddy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fdiff-buddy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fdiff-buddy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluffynuts","download_url":"https://codeload.github.com/fluffynuts/diff-buddy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240466796,"owners_count":19805862,"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":[],"created_at":"2024-10-03T01:44:16.746Z","updated_at":"2025-02-24T11:16:42.632Z","avatar_url":"https://github.com/fluffynuts.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Diff Buddy!\n---\n\nThis is a small utility to help with diffs on really large pull requests. To use:\n1. Clone the repo you're looking at (add and fetch all remotes, if necessary)\n2. Run diff-buddy - if you run from within the repo, it will default to diff against master\n3. Filter down results iteratively at the command-line with subsequent runs until\n    you end up seeing a useful changeset\n4. Run in review mode with your prior commandline and `--review` to comment on files. \n    When a review is complete, your comments can be copied to the clipboard to add to the pull request you're \n    reviewing. Reviews can be resumed - just quit and say you're not done with the review. Next time,\n    diff-buddy will attempt to pick up where you left off.\n\nQuick-start\n---\n1. `npm ci`\n2. Publish for your platform: `npm run publish-win32`\n3. cd into the `bin` folder, or add it to your path\n4. start using diff-buddy (:\n\nOptions\n---\n\ndiff-buddy has help which can be invoked from the command-line with `--help`:\n\n```\ndiff-buddy {args}\n\n-a, --at [number]               Show the diff at the provided index only\n-f, --from-branch [text]        Starting branch for the diff (master)\n-h, --help                      shows this help\n-I, --ignore-files [text]       Regular expressions for files to ignore completely\n-i, --ignore-lines [text]       Regular expressions for lines to ignore when deciding on interesting files\n    --ignore-whitespace         Ignore whitespace changes, even those spanning multiple lines, when deciding on interesting files\n-l, --limit [number]            Limit the number of files to list (2147483647)\n-o, --offset [number]           Start printing from this offset (0)\n-r, --repo [text]               (.)\n-S, --show-indexes              Show the numeric index for each file\n    --show-operations           Show the operation which this file has undergone: (A)dded, (D)eleted, (M)odified, (R)enamed\n-s, --show-patches              Whether or not to show patches for files\n-t, --to-branch [text]          Later branch to diff with\n\nNegate any flag argument with --no-{option}\n```\n\n(note that flags can be negated with `--no-`, eg `--no-show-indexes`)\n\nBuilding filters\n---\n\nThe whole point of diff-buddy is to reduce the number of files you need to look at to understand\na large pull request. Sometimes, a pull-request has many files which have changed but in an\ninsignificant way, eg because of a namespace rename or whitespace formatting.\n\nThe process, then, is as follows, for slimming down what would be interesting when\ncomparing some satellite branch in a local repo to master:\n1. Check out the satellite branch of interest\n2. Make sure you've got the latest: `git pull --rebase`\n3. Start with a plain old `diff-buddy.exe` run in the repository to get a feel for the size of the diff\n4. Scan for files which aren't of interest - perhaps you don't care about test files:\n    - `diff-buddy --ignore-files Tests.*`\n    - note that --ignore-files and --ignore-lines take regex strings: when working on unix shells like\n        bash and zsh, you may need to surround these with single-quotes to prevent the shell from\n        expanding them\n5. Enable patches and start looking at smaller clumps of files:\n    - `diff-buddy --ignore-files Tests.* --show-patches --limit 10 --offset 0`\n    - increase the offset by 10 at a time and look for uninteresting patterns to exclude\n6. Exclude files with uninteresting changes:\n    - `diff-buddy --ignore-files Tests.* --ignore-lines ^using --show-patches --limit 10 --offset 10`\n        - this ignores files where the only changes are to `using` statements, still\n            only outputting 10 files, after an offset of 10\n7. Add to the ignores for a few iterations until you can do\n    - `diff-buddy --ignore-files {...} --ignore-lines {...}`\n    - and end up with a small enough set of files that you are willing to review full patches for\n8. Now run with your prior commandline and `--review` to see each file, one-by-one\n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluffynuts%2Fdiff-buddy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluffynuts%2Fdiff-buddy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluffynuts%2Fdiff-buddy/lists"}