Improve error propagation in shallow call
Readability
Merge pull request #2124 from libgit2/better-shallow-errors

Improve error propagation in shallow call