{"id":13532778,"url":"https://github.com/joesonw/go-diff","last_synced_at":"2025-04-01T21:30:57.046Z","repository":{"id":57588094,"uuid":"258948162","full_name":"joesonw/go-diff","owner":"joesonw","description":"a simple tool to check changes between git commits for go source files. it will resolve package dependencies. this is helpful in large projects ci, you will only need to run tests on changed/related files.","archived":false,"fork":false,"pushed_at":"2023-12-27T15:08:27.000Z","size":44,"stargazers_count":28,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T16:52:57.909Z","etag":null,"topics":["ci","devop","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joesonw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2020-04-26T05:33:49.000Z","updated_at":"2025-02-27T22:16:48.000Z","dependencies_parsed_at":"2024-01-14T02:32:46.347Z","dependency_job_id":"e19f5ed9-a845-4d83-ad9c-1fe5f918fe6f","html_url":"https://github.com/joesonw/go-diff","commit_stats":null,"previous_names":["dstreamcloud/go-diff"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joesonw%2Fgo-diff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joesonw%2Fgo-diff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joesonw%2Fgo-diff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joesonw%2Fgo-diff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joesonw","download_url":"https://codeload.github.com/joesonw/go-diff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246712959,"owners_count":20821825,"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":["ci","devop","golang"],"created_at":"2024-08-01T07:01:13.680Z","updated_at":"2025-04-01T21:30:55.694Z","avatar_url":"https://github.com/joesonw.png","language":"Go","funding_links":[],"categories":["版本控制系统和附加组件"],"sub_categories":["Git"],"readme":"# Install\n\n`go get github.com/joesonw/go-diff`\n\n# Why\n\nThis little handy tool helps to manage large mono repositories. You don't have to rebuild every single service upon each little update.\n\nThis will help you to find out which services should be updated.\n\n# Important\nOnly works with `GO MODULES` ATM\n\n# Usage\n\n`go-diff -repo github.com/user/repo -branch master -from \u003cHASH\u003e -to \u003cHASH\u003e`\n\n\u003e or use `-repo file:///path/to/your/local/repo` to avoid cloning\n\n# What does it do\n1. It clones your repo\n2. It then checkouts into specified branch.\n3. It then does a diff between two hashes.\n4. It will add any changed `.go` files to the change list\n5. It compares two `go.sum` files and compute changed libraries, then added to change list\n6. It parses every `.go` file and find import dependencies.\n7. It adds every file that imported any package from change list, and does over and over again, until nothing new isfound.\n8. TADA! You have a list of packages that needed to be rebuilt.\n\n# Example\n\n`https://github.com/dstreamcloud/diff-sample/tree/go`\n\n\n## Example 1\n\n\u003e go-diff -repo https://github.com/dstreamcloud/diff-sample -branch go -from 1d748721adb49b79a529e446cca4b1a21bdd9b13 -to 4170f40939e939372e5c55beacd6a69ead53b976\n\nThis diff only changed `pkg/critical/critical.go`. But all packages are considered changed.\n\n## Example 2\n\u003e go-diff -repo https://github.com/dstreamcloud/diff-sample -branch go -from 4170f40939e939372e5c55beacd6a69ead53b976 -to 6597f05c8b41f1182ad4fba09720728ada22a7fa\n\nThis diff only updated dependency of logrus. Thus only `pkg/logrus` and root which depends on it are considered changed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoesonw%2Fgo-diff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoesonw%2Fgo-diff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoesonw%2Fgo-diff/lists"}