Skip to content

Conversation

@technoweenie
Copy link
Contributor

Fixes #2640 by moving the file permission logic from UnlockFile() to UnlockFileById(). The path is taken from the lock property returned by the /unlock api endpoint.

$ GIT_CURL_VERBOSE=1 git lfs unlock --id=123
> POST /my-repo.git/info/lfs/locks/123/unlock HTTP/1.1
> Host: github.com
> Accept: application/vnd.git-lfs+json; charset=utf-8
> Authorization: Basic * * * * *
> Content-Length: 15
> Content-Type: application/vnd.git-lfs+json; charset=utf-8
> User-Agent: git-lfs/2.3.1 (GitHub; darwin amd64; go 1.9)
>
{"force":false}

< HTTP/1.1 200 OK
< Content-Length: 141
< Content-Type: application/vnd.git-lfs+json
< Date: Tue, 03 Oct 2017 17:11:25 GMT
< X-Frame-Options: DENY
< X-Github-Request-Id: FF7E:5D17:5AA5486:AB0C1BC:59D3C4BD
<
{"lock":{"id":"123","path":"my-file.zip","locked_at":"2017-10-03T17:11:09Z","unlocked_at":"2017-10-03T17:11:25.692648804Z"}}
Unlocked Lock 123

@technoweenie technoweenie merged commit 4fe2667 into master Oct 3, 2017
@technoweenie technoweenie deleted the fix-unlock-by-id branch October 3, 2017 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants