Remove unused locking code
Merge pull request #6571 from torhve/gitlock

Remove unused locking code