Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unlock by ID with JSON Flag returns empty array #5385

Merged
merged 2 commits into from
Jun 7, 2023

Conversation

salvorizza
Copy link

When unlock is called with the JSON flag and ID, the response is empty.

The current behavior:
git lfs lock --json <SOME_PATH>
[{"id":"103","path":"<SOME_PATH>","owner":{"name":""},"locked_at":"2023-06-06T10:44:37Z"}]

git lfs unlock --json --id=103
[]

The expected behavior:
git lfs lock --json <SOME_PATH>
[{"id":"103","path":"<SOME_PATH>","owner":{"name":""},"locked_at":"2023-06-06T10:44:37Z"}]

git lfs unlock --json --id=103
[{"id":"103","unlocked":true}]

@salvorizza salvorizza requested a review from a team as a code owner June 6, 2023 10:46
Copy link
Member

@bk2204 bk2204 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, thanks for the patch, and welcome to Git LFS! This looks fine, but I've noticed there's some tests failing. Would you be willing to fix that as well and add some tests for this case in the t directory?

@salvorizza
Copy link
Author

@bk2204 I've created a test for this scenario, currently the only thing that is failing is a test on askpass on Mac, i think that's not related to this task.

Copy link
Member

@bk2204 bk2204 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks.

@bk2204 bk2204 merged commit 4f18bc4 into git-lfs:main Jun 7, 2023
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.

2 participants