Add file locking support (Git LFS)

Abierto
#235 3 comentarios 7 reacciones 0 asignados Ver en GitHub

@Leonardo-Rocha ya está trabajando en esto.

Desde el 7/10/2024.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
28/100
Tipo de issue
Nueva funcionalidad
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
git

Línea de trabajo

No se nombran archivos fuente, pruebas ni puntos de entrada. Empieza leyendo la documentación enlazada sobre el bloqueo de Git LFS y trazando la integración existente de VCS de Godot; define el flujo compatible para archivos bloqueables, los indicadores de estado, el comportamiento del guardado local y el manejo de los pulls antes de la implementación. Se considera terminado cuando el comportamiento de bloqueo propuesto funciona en estos casos y está cubierto por pruebas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement

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

Lenguaje dominante
C++
Estrellas
966
Forks
100
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de godotengine/godot-git-plugin

Todos los issues de godotengine/godot-git-plugin

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.