-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Git fails to register deletion of new staged files #7789
Comments
@RDIL do you mind confirming the same behavior in vscode? |
@vince-fugnitto In Gitpod |
Yes I know, just wanted to confirm if it also an issue in vscode and with the builtins. |
Alright so this is only in Theia |
No, that is not as expected. Deleting the file deletes it in the working tree. It does not affect the index. Seeing the deletion after one has committed is correct because the file was added in the commit. The error is in fact that the file does not show at all after the deletion and before the commit. It should show as added in the staged changes and deleted in the unstaged changes. The problem is caused by these lines: The comment is incorrect. Those lines just need to be removed. One will then see the file added in the staged changes and deleted in the unstaged changes as expected (i.e. as vscode does and as git-gui does). |
Pull-request created eclipse-theia/dugite-extra#36 |
Bug Description
I'm going to do my best to explain this confusing bug.
Say you are in a git repository.
If you add a file called
file.txt
, head to the git tab, and then stage it, it switches to the staged section as expected.However, if you delete this file, it disappears from the staged section - again, as expected.
But once you do commit, you will see that one pending change which was not visible before is now showing itself - the deletion of
file.txt
!Steps to Reproduce
Additional Information
The text was updated successfully, but these errors were encountered: