Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add file locking support (Git LFS) #235

Open
clorl opened this issue Apr 28, 2024 · 3 comments
Open

Add file locking support (Git LFS) #235

clorl opened this issue Apr 28, 2024 · 3 comments

Comments

@clorl
Copy link

clorl commented Apr 28, 2024

LFS introduces a very helpful concept called "file locking" (Docs here and here. It is akin to the "checkout" feature in Perforce (not to confuse with checkout in Git which doesn't mean the same thing at all). Basically, you can "lock" a file, so you only are able to push it in the remote repo.

image

As a professional game dev myself, it was used a lot in the previous studios I worked in. It can be annoying, but it's really helpful for editing for example game levels. I know tscn files are text-based and should be suitable for merging, but in practice, unresolvable dependy errors often arise, which brings development to a halt.

The integration should be similar to Unreal Engine's Perforce integration, which means :

  • When saving a "lockable" filetype, a popup appears asking you tick the file(s) that you want to lock. You cannot save a file if you haven't locked it. If it is already locked, it shows you who locked it
  • Locked files are shown in the file browser with a little icon. A separate panel could be used to list all locally locked files.
  • If you want to save a locked file locally for testing purposes, you can do it. In Unreal it's called "save as writable". Such files should also be indicated in the file browser. Their changes will be overwritten when pulling from the remote repo if the file has been pushed.
  • There could be a dialog asking you what to do with such files when pulling. Either overwrite, or move your changes to a duplicate that you can then manually merge or integrate in the project.

Tricky thing is, if an asset is referenced in a scene and that asset is changed, Unreal Engine will mark it as saved and will ask you to check it out. I do not know how Godot handles this.

I would very much like to bring this feature to the project with a pull request.

Mockups

Save Popup
image

File browser
image

Pull Popup
image

@phnix-dev
Copy link

It would be nice to have a feature where you have to do a pull before you lock a file if it is out of date.

@Leonardo-Rocha
Copy link

Is this already in the works by someone @Calinou ? Otherwise I'd like to take on the challenge myself.

@Calinou
Copy link
Member

Calinou commented Oct 11, 2024

Is this already in the works by someone @Calinou ? Otherwise I'd like to take on the challenge myself.

Not that I know of. Feel free to open a pull request for this 🙂

@Calinou Calinou changed the title File locking support (Git LFS) Add file locking support (Git LFS) Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants