Skip to content

Commit 9aae378

Browse files
authored
Update modules/lfs/http_client.go
1 parent c878bea commit 9aae378

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/lfs/http_client.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ func (c *HTTPClient) batch(ctx context.Context, operation string, objects []Poin
7272

7373
url := fmt.Sprintf("%s/objects/batch", c.endpoint)
7474

75+
// `ref` is an "optional object describing the server ref that the objects belong to"
76+
// but some (incorrect) lfs servers require it, so maybe adding an empty ref here doesn't break the correct ones.
77+
// https://github.com/git-lfs/git-lfs/blob/a32a02b44bf8a511aa14f047627c49e1a7fd5021/docs/api/batch.md?plain=1#L37
7578
request := &BatchRequest{operation, c.transferNames(), &Reference{}, objects}
7679
payload := new(bytes.Buffer)
7780
err := json.NewEncoder(payload).Encode(request)

0 commit comments

Comments
 (0)