Add file locking support (Git LFS)

Aperta
#235 3 commenti 7 reazioni 0 assegnatari Vedi su GitHub

@Leonardo-Rocha ci sta già lavorando.

Dal 7/10/2024.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
28/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
git
Ambito
devtools, game-dev

Direzione di ricerca

Non sono indicati file sorgente, test o punti di ingresso. Inizia leggendo la documentazione collegata sul locking di Git LFS e mappando l’integrazione VCS esistente di Godot; definisci il flusso supportato per i file bloccabili, gli indicatori di stato, il comportamento del salvataggio locale e la gestione dei pull prima dell’implementazione. Il lavoro è completo quando il comportamento di locking proposto funziona in questi casi ed è coperto da test.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C++
Stelle
966
Fork
100
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di godotengine/godot-git-plugin

Tutte le issue di godotengine/godot-git-plugin

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.