aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/protocol/packp/updreq_encode.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/protocol/packp/updreq_encode.go')
-rw-r--r--plumbing/protocol/packp/updreq_encode.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/plumbing/protocol/packp/updreq_encode.go b/plumbing/protocol/packp/updreq_encode.go
index b2b7944..44c0573 100644
--- a/plumbing/protocol/packp/updreq_encode.go
+++ b/plumbing/protocol/packp/updreq_encode.go
@@ -29,6 +29,14 @@ func (r *ReferenceUpdateRequest) Encode(w io.Writer) error {
return err
}
+ if r.Packfile != nil {
+ if _, err := io.Copy(w, r.Packfile); err != nil {
+ return err
+ }
+
+ return r.Packfile.Close()
+ }
+
return nil
}