diff options
Diffstat (limited to 'plumbing/protocol/packp/advrefs_decode.go')
-rw-r--r-- | plumbing/protocol/packp/advrefs_decode.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plumbing/protocol/packp/advrefs_decode.go b/plumbing/protocol/packp/advrefs_decode.go index fddd69b..e0a449e 100644 --- a/plumbing/protocol/packp/advrefs_decode.go +++ b/plumbing/protocol/packp/advrefs_decode.go @@ -55,8 +55,12 @@ type decoderStateFn func(*advRefsDecoder) decoderStateFn // fills out the parser stiky error func (d *advRefsDecoder) error(format string, a ...interface{}) { - d.err = fmt.Errorf("pkt-line %d: %s", d.nLine, - fmt.Sprintf(format, a...)) + msg := fmt.Sprintf( + "pkt-line %d: %s", d.nLine, + fmt.Sprintf(format, a...), + ) + + d.err = NewErrUnexpectedData(msg, d.line) } // Reads a new pkt-line from the scanner, makes its payload available as |