git-codereview: cleanup tmp directory if newGitTest fails.

This sets up a deferred os.RemoveAll call that runs only if
newGitTest fails to return a gitTest instance.

Change-Id: I62814e47d2cf152e3b5fcb3dd07da8df2fb63091
Reviewed-on: https://go-review.googlesource.com/2900
Reviewed-by: Andrew Gerrand <adg@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
1 file changed
tree: c14186c3b78839c7714be95728c64ddfec576c97
  1. git-codereview/
  2. .gitattributes
  3. README