diff options
Diffstat (limited to 'cmd_comment.go')
-rw-r--r-- | cmd_comment.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cmd_comment.go b/cmd_comment.go index c640fef..c0325b4 100644 --- a/cmd_comment.go +++ b/cmd_comment.go @@ -16,11 +16,10 @@ package libfastimport import ( - "fmt" "strconv" "strings" - "git.lukeshu.com/go/libfastimport/textproto" + "github.com/pkg/errors" ) // comment ///////////////////////////////////////////////////////////////////// @@ -65,7 +64,7 @@ func (CmdGetMark) fiCmdRead(fir fiReader) (cmd Cmd, err error) { c := CmdGetMark{} c.Mark, err = strconv.Atoi(trimLinePrefix(line, "get-mark :")) if err != nil { - return nil, fmt.Errorf("get-mark: %v", err) + return nil, errors.Wrap(err, "get-mark") } return c, nil } @@ -103,7 +102,7 @@ func (CmdCatBlob) fiCmdRead(fir fiReader) (cmd Cmd, err error) { // 40-byte SHA-1. type CmdLs struct { DataRef string // optional if inside of a commit - Path textproto.Path + Path Path } // If you're thinking "but wait, parser_registerCmd will see CmdLs as @@ -140,7 +139,7 @@ func (CmdLs) fiCmdRead(fir fiReader) (cmd Cmd, err error) { sp = strings.IndexByte(line, ' ') } c := CmdLs{} - c.Path = textproto.PathUnescape(str[sp+1:]) + c.Path = PathUnescape(str[sp+1:]) if sp >= 0 { c.DataRef = str[:sp] } |