From 53b91ef306166d39dea3c70fb8ce14973c7ae111 Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Sun, 5 Apr 2020 00:14:22 +0800 Subject: lfs: run e2e and fix minor issues (#6059) --- internal/lfsutil/storage.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'internal/lfsutil/storage.go') diff --git a/internal/lfsutil/storage.go b/internal/lfsutil/storage.go index fa10ee03..b2bfe37f 100644 --- a/internal/lfsutil/storage.go +++ b/internal/lfsutil/storage.go @@ -6,7 +6,6 @@ package lfsutil import ( "path/filepath" - "strings" ) // Storage is the storage type of an LFS object. @@ -23,7 +22,5 @@ func StorageLocalPath(root string, oid OID) string { return "" } - // Valid OID is guaranteed to have second element as hash. - hash := strings.SplitN(string(oid), ":", 2)[1] - return filepath.Join(root, string(hash[0]), string(hash[1]), hash) + return filepath.Join(root, string(oid[0]), string(oid[1]), string(oid)) } -- cgit v1.2.3