Skip to content

Local locks aren't updated correctly when lock/unlock fails on some files #5055

@SalmaFarghaly

Description

@SalmaFarghaly

The local locks seems to be not updated when lock/unlock command fails on some files. I have tried the following steps. Lets assume w have a repo that GIT-LFS is applied to and it has 2 files out1.txt and out2.txt

Steps to reproduce the behavior:

  1. Run 'git lfs lock out1.txt'
  2. Run 'git lfs locks --local' -> Now I can see that a lock is reported on out1.txt and that is correct
  3. Run 'git lfs lock out1.txt out2.txt' -> The lock will fail on out1.txt because it is already locked. But will succeed on out2.txt
  4. Run 'git lfs locks --local' -> I can see that out1.txt lock only is reported

Expected behavior
I expect the lock of out2.txt to be reported too in step 4. Note when I run 'git lfs locks' in step 4 I can see that out2.txt lock is reported successfully.

Note : I am using GIT-LFS v3.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions