aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/protocol/packp/ulreq_encode.go
diff options
context:
space:
mode:
Diffstat (limited to 'plumbing/protocol/packp/ulreq_encode.go')
-rw-r--r--plumbing/protocol/packp/ulreq_encode.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/plumbing/protocol/packp/ulreq_encode.go b/plumbing/protocol/packp/ulreq_encode.go
index c451e23..8b19c0f 100644
--- a/plumbing/protocol/packp/ulreq_encode.go
+++ b/plumbing/protocol/packp/ulreq_encode.go
@@ -132,6 +132,17 @@ func (e *ulReqEncoder) encodeDepth() stateFn {
return nil
}
+ return e.encodeFilter
+}
+
+func (e *ulReqEncoder) encodeFilter() stateFn {
+ if filter := e.data.Filter; filter != "" {
+ if err := e.pe.Encodef("filter %s\n", filter); err != nil {
+ e.err = fmt.Errorf("encoding filter %s: %s", filter, err)
+ return nil
+ }
+ }
+
return e.encodeFlush
}