Use context cancellation instead of command.Close
- no longer possible / necessary to call command.Close()
- no longer need ioutil.Discard to get exit status of git command
The flipside of this change is that it becomes more important to cancel all contexts. I had to change some tests that used context.Background()
because they started leaking processes.
Edited by Jacob Vosmaer (GitLab)