Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • TortoiseGit TortoiseGit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 382
    • Issues 382
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGitTortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #3736
Closed
Open
Issue created Apr 26, 2021 by Mikhail S. Kataev@lpestl

LFS force unlock not working

Description

In projects in which LFS is configured and lockable files are configured, "Force unlock" does not work on files locked by another user.

The essence of the problem is that the "--force" flag for the "lfs unlock" command is not transmitted. If you repeat the command in git bash, with the necessary "force" flag, the file will be successfully unlocked. In tortoiseGit, today this problem is relevant even on the most recent assembly. There is no error message as such (it is identical to the message when trying to unlock a file without the "force" flag).

What steps will reproduce the problem?

  1. Set up a test repository, configure LFS to track files, as well as add the ability to block for any type of files, for example:
git lfs track "*.umap" --lockable
  1. Ask another user who has access to this repository to lock some locked file, for example:
git lfs lock "Content/DownToEarth/Maps/MainMenu.umap"
  1. In your local copy of the repository, call the context menu with the right mouse button and select the menu item TortoiseGit -> LFS -> Show locked files
  2. In the window that opens, leave a check mark in front of the file locked by another user and click on "Unlock" button, as an example in screenshot 01.png

01

  1. Wait for the command to complete. The command will be executed with an error text that the file is locked by another user (this is the correct behavior).

02

  1. Now the "Force unlock" button will become available. You need to click on this button to repeat the execution of the command with the "--force" flag. The screenshot shows a debug message (if it is enabled in the settings), so that it can be seen that the "/force" parameter for TortoiseGit is successfully transmitted.

03

  1. Wait for the command to complete. As a result, we will see a similar error message that the file cannot be unlocked. it is blocked by another user. This is not the correct behavior, as the "/force" parameter for TortoiseGit should have added the "--force" parameter for the Git for Windows.
  2. To make sure that this is a bug and that something really does not work as it should (that there is a bug), you can repeat the step 6.

What is the expected output? What do you see instead?

Expected Result: At step 7, the completion of the command after clicking on "force unlock" should be successful and unlock the file that was locked by another user. Likewise, if we tried to unlock a file that was locked by me. As in the screenshot: 05

###What version of TortoiseGit and Git are you using? On what operating system?###

git --version
git version 2.31.1.windows.1
git lfs --version
git-lfs/2.13.3 (GitHub; windows amd64; go 1.16.2; git a5e65851)
TortoiseGit 2.12.0.0 (C:\Program Files\TortoiseGit\bin)
git version 2.31.1.windows.1 (C:\Program Files\Git\bin; C:\Program Files\Git\mingw64\; C:\Program Files\Git\etc\gitconfig)

06

windows 10 corporate
version 1909
Build the OS 18363.1533

07

Edited Apr 26, 2021 by Sven Strickroth
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking