You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/locking.md
+15-12Lines changed: 15 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ simplest use case: single branch locking. The API is designed to be extensible
26
26
as we experiment with more advanced locking scenarios, as defined in the
27
27
[original proposal](/docs/proposals/locking.md).
28
28
29
+
The [Batch API's `ref` property docs](./batch.md#ref-property) describe how the `ref` property can be used to support auth schemes that include the server ref. Locking API implementations should also only use it for authentication, until advanced locking scenarios have been developed.
30
+
29
31
## Create Lock
30
32
31
33
The client sends the following to create a lock by sending a `POST` to `/locks`
@@ -35,9 +37,8 @@ to one user.
35
37
36
38
*`path` - String path name of the file that is locked. This should be
37
39
relative to the root of the repository working directory.
38
-
*`ref` - The fully-qualified reference from which the client is locking the
39
-
file. It is the responsibility of the server implementing this specification
40
-
to decide on the semantic meaning of this.
40
+
*`ref` - Optional object describing the server ref that the locks belong to. Note: Added in v2.4.
41
+
*`name` - Fully-qualified server refspec.
41
42
42
43
```js
43
44
// POST https://lfs-server.com/locks
@@ -47,7 +48,7 @@ to decide on the semantic meaning of this.
47
48
{
48
49
"path":"foo/bar.zip",
49
50
"ref": {
50
-
"name":"refs/heads/my-feature
51
+
"name":"refs/heads/my-feature"
51
52
}
52
53
}
53
54
```
@@ -157,8 +158,8 @@ The properties are sent as URI query values, instead of through a JSON body:
157
158
should be the `next_cursor` from a previous request.
158
159
*`limit` - The integer limit of the number of locks to return. The server
159
160
should have its own upper and lower bounds on the supported limits.
160
-
* `ref` - Optional reference representing the reference from which the client
161
-
is searching for looks.
161
+
*`ref` - Optional fully qualified server refspec
162
+
from which to search for locks.
162
163
163
164
```js
164
165
// GET https://lfs-server.com/locks?path=&id=&cursor=&limit=
@@ -251,8 +252,11 @@ LFS Servers should ensure that users have push access to the repository.
251
252
Clients send the following to list locks for verification by sending a `POST`
252
253
to `/locks/verify` (appended to the LFS server url, as described above):
253
254
254
-
* `cursor`
255
-
* `limit`
255
+
*`ref` - Optional object describing the server ref that the locks belong to. Note: Added in v2.4.
256
+
*`name` - Fully-qualified server refspec.
257
+
*`cursor` - Optional cursor to allow pagination. Servers can determine how cursors are formatted based on how they are stored internally.
258
+
*`limit` - Optional limit to how many locks to
259
+
return.
256
260
257
261
```js
258
262
// POST https://lfs-server.com/locks/verify
@@ -385,9 +389,8 @@ Properties:
385
389
386
390
*`force` - Optional boolean specifying that the user is deleting another user's
387
391
lock.
388
-
* `ref` - Optional reference object specifying the reference from which the
389
-
client is deleting the lock. It is the responsibility of the server implementing
390
-
this specification to decide upon the semantic meaning of this.
392
+
*`ref` - Optional object describing the server ref that the locks belong to. Note: Added in v2.4.
393
+
*`name` - Fully-qualified server refspec.
391
394
392
395
```js
393
396
// POST https://lfs-server.com/locks/:id/unlock
@@ -398,7 +401,7 @@ this specification to decide upon the semantic meaning of this.
0 commit comments