@@ -67,12 +67,12 @@ func (c *HTTPClient) transferNames() []string {
6767 return keys
6868}
6969
70- func (c * HTTPClient ) batch (ctx context.Context , operation , refName string , objects []Pointer ) (* BatchResponse , error ) {
70+ func (c * HTTPClient ) batch (ctx context.Context , operation string , objects []Pointer ) (* BatchResponse , error ) {
7171 log .Trace ("BATCH operation with objects: %v" , objects )
7272
7373 url := fmt .Sprintf ("%s/objects/batch" , c .endpoint )
7474
75- request := & BatchRequest {operation , c .transferNames (), & Reference {Name : refName }, objects }
75+ request := & BatchRequest {operation , c .transferNames (), & Reference {}, objects }
7676 payload := new (bytes.Buffer )
7777 err := json .NewEncoder (payload ).Encode (request )
7878 if err != nil {
@@ -106,17 +106,17 @@ func (c *HTTPClient) batch(ctx context.Context, operation, refName string, objec
106106}
107107
108108// Download reads the specific LFS object from the LFS server
109- func (c * HTTPClient ) Download (ctx context.Context , refName string , objects []Pointer , callback DownloadCallback ) error {
110- return c .performOperation (ctx , refName , objects , callback , nil )
109+ func (c * HTTPClient ) Download (ctx context.Context , objects []Pointer , callback DownloadCallback ) error {
110+ return c .performOperation (ctx , objects , callback , nil )
111111}
112112
113113// Upload sends the specific LFS object to the LFS server
114114func (c * HTTPClient ) Upload (ctx context.Context , objects []Pointer , callback UploadCallback ) error {
115- return c .performOperation (ctx , "" , objects , nil , callback )
115+ return c .performOperation (ctx , objects , nil , callback )
116116}
117117
118118// performOperation takes a slice of LFS object pointers, batches them, and performs the upload/download operations concurrently in each batch
119- func (c * HTTPClient ) performOperation (ctx context.Context , refName string , objects []Pointer , dc DownloadCallback , uc UploadCallback ) error {
119+ func (c * HTTPClient ) performOperation (ctx context.Context , objects []Pointer , dc DownloadCallback , uc UploadCallback ) error {
120120 if len (objects ) == 0 {
121121 return nil
122122 }
@@ -126,7 +126,7 @@ func (c *HTTPClient) performOperation(ctx context.Context, refName string, objec
126126 operation = "upload"
127127 }
128128
129- result , err := c .batch (ctx , operation , refName , objects )
129+ result , err := c .batch (ctx , operation , objects )
130130 if err != nil {
131131 return err
132132 }
0 commit comments