Present a diff of the update before writing it to file
I'd like to have niv produce a (git-like) diff of the PackageSpec before it's written to file. This could be a CLI opt like niv update --dry-run or niv update --give-choice.
Note: we're gonna run into some difficulties if #73 is implemented.
Isn't this what version control is for? I can see that outputting if something was changed for an individual package would be helpful.
If possible, there could be some value on having this information without downloading the source itself. Here is a quick mock-up of the output of a diff-like command
nixpkgs
10,12c10,12
< "rev": "491a0bbc69c053c2a4fca69be7960ec8ffab56a4",
< "sha256": "0agd8xhm5ddww9m4v7lbp782zn0fi5rw2f3z1rlw89lph307vxlz",
< "url": "https://github.com/NixOS/nixpkgs/archive/491a0bbc69c053c2a4fca69be7960ec8ffab56a4.tar.gz"
---
> "rev": "47892abb69c053c2a4fca69be7960ec8ffab56a4",
> "sha256": <not computed>,
> "url": "https://github.com/NixOS/nixpkgs/archive/47892abb69c053c2a4fca69be7960ec8ffab56a4.tar.gz"
What is the value you are thinking of? I can see it as purely information to show the change in revision (abcdef -> defga123) but not the diff of that file. Also, why is it important that this happens before the update? Do you expect to skip an update when you see a specific commit id there?
What about a flag like --dry? That means that niv update nixpkgs --dry would either show a diff, or the new version. I like the diff, I think some output like Terraform's plan would be good.