git-commit: fix double close(2) that can close a wrong file descriptor