Skip to content

Commit f0d7643

Browse files
committed
revert empty lfs ref name
1 parent 05e9063 commit f0d7643

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/lfs/http_client.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ func (c *HTTPClient) batch(ctx context.Context, operation string, objects []Poin
7575
// `ref` is an "optional object describing the server ref that the objects belong to"
7676
// but some (incorrect) lfs servers require it, so maybe adding an empty ref here doesn't break the correct ones.
7777
// https://github.com/git-lfs/git-lfs/blob/a32a02b44bf8a511aa14f047627c49e1a7fd5021/docs/api/batch.md?plain=1#L37
78-
request := &BatchRequest{operation, c.transferNames(), &Reference{}, objects}
78+
// UPDATE: it can't use "empty ref" here because it breaks others like https://github.com/go-gitea/gitea/issues/33453
79+
request := &BatchRequest{operation, c.transferNames(), nil, objects}
80+
7981
payload := new(bytes.Buffer)
8082
err := json.NewEncoder(payload).Encode(request)
8183
if err != nil {

0 commit comments

Comments
 (0)