diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-24 12:21:55 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-11-24 12:33:03 -0500 |
commit | 221873029a6166acaba1fef37508f9f1544180cd (patch) | |
tree | 8fedd9d27d25c0591e2f60468670335a4ded9a25 /parse_catblob.go | |
parent | 4a566395874113e38b5785fc5e436c96c001b032 (diff) |
clean up textproto; move types.go into libfastimport
Diffstat (limited to 'parse_catblob.go')
-rw-r--r-- | parse_catblob.go | 8 |
1 files changed, 3 insertions, 5 deletions
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) { // <mode> SP ('blob' | 'tree' | 'commit') SP <dataref> HT <path> LF // or // 'missing' SP <path> 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 } } |