gohack
gohack copied to clipboard
implement gohack diff subcommand
When we do gohack get of a module without specifying the -vcs flag, we record the checksum so we can later report that the source has been changed, but we have know way of informing the user exactly what has been changed.
We should record the version that's being checked out as well as the checksum. That way we can find out what's changed (using gohack diff). This also potentially allows us to switch from default to VCS mode while preserving changes made by the user.
One potentially issue with implementing this command is that it's potentially a slippery slope towards adding endless diff features.
If you use github.com/pkg/diff to provide the diff, then there'll be much less temptation to support adding endless diff features, since package diff probably doesn't support them. :) And it doesn't require an external diff tool.