aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/protocol/packp/ulreq_decode.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-12-12 15:50:15 +0100
committerGitHub <noreply@github.com>2016-12-12 15:50:15 +0100
commitdf9748cfb51db9c406e3df063badbd8c78ee819d (patch)
treec03578daefa14b14ca480c3e801ee8e225599b22 /plumbing/protocol/packp/ulreq_decode.go
parent3967812bd0de40330dfbb9e1a7d14d4073cc1b10 (diff)
downloadgo-git-df9748cfb51db9c406e3df063badbd8c78ee819d.tar.gz
transport: new git protocol (#175)
Diffstat (limited to 'plumbing/protocol/packp/ulreq_decode.go')
-rw-r--r--plumbing/protocol/packp/ulreq_decode.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/plumbing/protocol/packp/ulreq_decode.go b/plumbing/protocol/packp/ulreq_decode.go
index 541a077..bcd642d 100644
--- a/plumbing/protocol/packp/ulreq_decode.go
+++ b/plumbing/protocol/packp/ulreq_decode.go
@@ -45,8 +45,12 @@ func (d *ulReqDecoder) Decode(v *UploadRequest) error {
// fills out the parser stiky error
func (d *ulReqDecoder) 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