Improve error handling logic
Improve error handling logic

Signed-off-by: Antonio Jesus Navarro Perez <c58e207b851e514e225c1c508a9aa75fdffb7798@gmail.com>

go-git/go-git,go-git/go-git,src-d/go-git,mcuadros/go-git,mcuadros/go-git,src-d/go-git