Skip to content

Commit c005954

Browse files
authored
Merge branch 'main' into golangciup
2 parents 0fec0c8 + 7616aeb commit c005954

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

modules/lfs/http_client.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ func (c *HTTPClient) batch(ctx context.Context, operation string, objects []Poin
7272

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

75-
request := &BatchRequest{operation, c.transferNames(), nil, objects}
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
78+
request := &BatchRequest{operation, c.transferNames(), &Reference{}, objects}
7679
payload := new(bytes.Buffer)
7780
err := json.NewEncoder(payload).Encode(request)
7881
if err != nil {

0 commit comments

Comments
 (0)