diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-12-12 15:50:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-12 15:50:15 +0100 |
commit | df9748cfb51db9c406e3df063badbd8c78ee819d (patch) | |
tree | c03578daefa14b14ca480c3e801ee8e225599b22 /plumbing/protocol/packp/advrefs_decode.go | |
parent | 3967812bd0de40330dfbb9e1a7d14d4073cc1b10 (diff) | |
download | go-git-df9748cfb51db9c406e3df063badbd8c78ee819d.tar.gz |
transport: new git protocol (#175)
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 |