3 ms·
Man, had to really dig to find that. Ctrl-F "lock" didn't hit anything on the landing page or main docs page. Even then it looks like an implementation that mi
by vvanders 9y ago
Man, had to really dig to find that. Ctrl-F "lock" didn't hit anything on the landing page or main docs page.
Even then it looks like an implementation that misses the mark. Both Perforce and SVN mark "lockable" files as Read-Only on a sync of the local copy. It looks like all this does is prevent a push of the file which will be the same result as if someone merged it ahead of you.
Without that guard in place it makes it really easy to make a mistake and then have changes to a binary file that will collide. Having a checkout process as part of locking workflow is pretty much mandatory.
[edit]
Nevermind, I finally found this[1] that explains Git LFS does it correctly, kudos! Could do with some more detailed documentation since it looks partially implemented from the man pages.
[1] https://github.com/git-lfs/git-lfs/wiki/File-Locking https://github.com/git-lfs/git-lfs/wiki/File-Locking