From 221873029a6166acaba1fef37508f9f1544180cd Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 24 Nov 2017 12:21:55 -0500 Subject: clean up textproto; move types.go into libfastimport --- parse_catblob.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'parse_catblob.go') diff --git a/parse_catblob.go b/parse_catblob.go index 7a018cf..6d5bd87 100644 --- a/parse_catblob.go +++ b/parse_catblob.go @@ -4,8 +4,6 @@ import ( "fmt" "strconv" "strings" - - "git.lukeshu.com/go/libfastimport/textproto" ) func cbpGetMark(line string) (string, error) { @@ -67,7 +65,7 @@ func cbpCatBlob(full string) (sha1 string, data string, err error) { return sha1, data, err } -func cbpLs(line string) (mode textproto.Mode, dataref string, path textproto.Path, err error) { +func cbpLs(line string) (mode Mode, dataref string, path Path, err error) { // SP ('blob' | 'tree' | 'commit') SP HT LF // or // 'missing' SP LF @@ -78,7 +76,7 @@ func cbpLs(line string) (mode textproto.Mode, dataref string, path textproto.Pat if strings.HasPrefix(line, "missing ") { strPath := line[8:] - return 0, "", textproto.PathUnescape(strPath), nil + return 0, "", PathUnescape(strPath), nil } else { fields := strings.SplitN(line, " ", 3) if len(fields) < 3 { @@ -97,6 +95,6 @@ func cbpLs(line string) (mode textproto.Mode, dataref string, path textproto.Pat if err != nil { return 0, "", "", err } - return textproto.Mode(nMode), strRef, textproto.PathUnescape(strPath), nil + return Mode(nMode), strRef, PathUnescape(strPath), nil } } -- cgit v1.2.3