cmd/gg.newTestEnv takes in a testing.TB:
https://github.com/zombiezen/gg/blob/7a34fa369d22ac969419dd375a19c0ee031ebeec/cmd/gg/main_test.go#L138
It would be better to avoid doing this: if it needs to log, then it should take in a logging interface. However, it does do auto-skipping:
https://github.com/zombiezen/gg/blob/7a34fa369d22ac969419dd375a19c0ee031ebeec/cmd/gg/main_test.go#L142-L144
... which would be annoying to replicate across all test sites, but this is what internal/git does.