-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
Staging Doesn't Stage Files in Git? (MacOS) #54
Comments
This is one oversimplification we had to do to make staging and committing possible in code (libgit2 doesn't seem to have the best documentation so a lot of the implementation we did for v1.x was "figured out" with experimentation). This was also a glaring weakness in our v1.x which has been since fixed and implemented properly in the upcoming v2.0. (v2.0 is currently on hold till the GDNative C++ API gets updated for Godot 4.0, see godotengine/godot-cpp#449). |
Yeah, looks like it just maintains a list of files: godot-git-plugin/godot-git-plugin/src/git_api.cpp Lines 81 to 95 in d598850
By the way, this could be considered a bug, because staging implies saving the state of the working tree (if I use the terms correctly). I use This means that when exiting the editor, you may get disappointed due to the fact that those staged changes were not saved in case you did something stupid just before exiting the editor to revert those dirty changes. Also, I'm in the process of working on built-in integration of Git in Goost, see goostengine/goost#98, and before merging it likely makes sense to resolve this regardless, but I'm not yet sure what to do, need to learn libgit2 API a bit, or perhaps take a look at v2.0 of this plugin (yet I'm working against the v1.0 version in Godot 3.x, so might not be possible to do). Update: resolved this in |
The Godot 3.5 beta1 is now live. And along with it, we released a v2.0.0 of this plugin which should fix this issue. Files that are staged in the editor will now appear as staged when checking through |
OS: MacOS (10.14.6)
Godot: 3.2.3 (stable)
When I click "Stage Selected" or "Stage All" I am told "Stage contains 1 file" at the bottom, but the file remains Yellow in the staging area in the UI and the git index is not changed when I look at
git status
.Commit Changes
does commit the staged file, but there is no way for me to see what is staged, and what isn't. Shouldn't staging a file stage in the plugin also stage it in the git index so that the plugin interacts with other git tools correctly? Right now it seems like Godot has its own invisible notion of what is staged and what isn't, that is unrelated to the git index status.The text was updated successfully, but these errors were encountered: