Deleting locked file doesn't remove the lock prehook

When a person locks a file and then deletes the file, the file remains locked even though it no longer exists.

Steps to reproduce:

  1. User locks file
  2. User deletes file that they locked
  3. File remains locked, preventing pushes to the repo even though the file doesn't exist anymore.

The UI will show the file that was locked so it can be removed currently:

Screen_Shot_2018-04-25_at_10.51.42_AM

Proposal

If a user locks a file and then deletes said file, there should be no prehook that marks the file as locked anymore because the file doesn't exist.

Assignee Loading
Time tracking Loading