Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/diff/run.go: reset worktree after loading packages (#2)
After loading Go packages, the go.mod and go.sum files are sometimes modified. This causes subsequent checkouts of other commits to fail, which results in the command failing to produce API differences. This commit performs a hard reset on the worktree after the packages have been loaded so that subsequent checkouts succeed. This should be safe because go-apidiff checks to ensure that the tree is clean when the program starts.
- Loading branch information