diff options
author | Miguel Molina <miguel@erizocosmi.co> | 2018-08-08 16:56:20 +0200 |
---|---|---|
committer | Miguel Molina <miguel@erizocosmi.co> | 2018-08-08 16:56:20 +0200 |
commit | 5889a3b669f0f515ff445aa040afc1e7eeb2bbd1 (patch) | |
tree | 1a7e2bbe9ba7c2ae1111120ed84fe7850a934375 /storage | |
parent | 6a24b4c1f0cb9e5daf30fa7979f2643a967af1ad (diff) | |
download | go-git-5889a3b669f0f515ff445aa040afc1e7eeb2bbd1.tar.gz |
plumbing: packfile, allow non-seekable sources on Parser
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
Diffstat (limited to 'storage')
-rw-r--r-- | storage/filesystem/dotgit/writers.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/filesystem/dotgit/writers.go b/storage/filesystem/dotgit/writers.go index e1ede3c..93d2d8c 100644 --- a/storage/filesystem/dotgit/writers.go +++ b/storage/filesystem/dotgit/writers.go @@ -57,7 +57,12 @@ func newPackWrite(fs billy.Filesystem) (*PackWriter, error) { func (w *PackWriter) buildIndex() { s := packfile.NewScanner(w.synced) w.writer = new(idxfile.Writer) - w.parser = packfile.NewParser(s, w.writer) + var err error + w.parser, err = packfile.NewParser(s, w.writer) + if err != nil { + w.result <- err + return + } checksum, err := w.parser.Parse() if err != nil { |