diff options
Diffstat (limited to 'vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/common.go')
-rw-r--r-- | vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/common.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/common.go b/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/common.go index 2b4acebdeb..0d9ed5447d 100644 --- a/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/common.go +++ b/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/common.go @@ -51,7 +51,13 @@ func WritePackfileToObjectStorage( } defer ioutil.CheckClose(w, &err) - _, err = io.Copy(w, packfile) + + var n int64 + n, err = io.Copy(w, packfile) + if err == nil && n == 0 { + return ErrEmptyPackfile + } + return err } |