summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/odb.go b/odb.go
index f236fc4..fd27363 100644
--- a/odb.go
+++ b/odb.go
@@ -8,6 +8,7 @@ extern void _go_git_odb_backend_free(git_odb_backend *backend);
*/
import "C"
import (
+ "io"
"reflect"
"runtime"
"unsafe"
@@ -287,6 +288,9 @@ func (stream *OdbReadStream) Read(data []byte) (int, error) {
if ret < 0 {
return 0, MakeGitError(ret)
}
+ if ret == 0 {
+ return 0, io.EOF
+ }
header.Len = int(ret)