-
Notifications
You must be signed in to change notification settings - Fork 16
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
Show file when staged to add but deleted in working tree #36
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Nigel Westbury <[email protected]>
…file Signed-off-by: Nigel Westbury <[email protected]>
Can you add a test for it? Also, aligning the implementation with GitHub Desktop would make sense: https://github.com/desktop/desktop/blob/3551d3742753b85084a165c46ac582a4be5fd090/app/src/lib/git/status.ts#L255-L297 |
I was wondering where the offending code came from. It looked like it was fixing someone's bug but it certainly was not fixing any bug in Theia.
Not really. GitHub Desktop presents a simpler interface to the user. It does not show staged changes and unstaged changes. It just presents all the changes in a single list, each file listed once only, and has check-boxes to select which files will be committed. My 14 year old son says he won't use GitHub Desktop because it is too simple for his needs. Theia, however, is designed to show staged and unstaged changes correctly, like vs-code, git-gui and git-kraken. Definitely best to return the status information as git does. Consumers can do this funky merging of staged and unstaged states if they want, but dugite-extra should not do this because then the information is lost and consumers can't present staged and unstaged states correctly I'll get the test done tomorrow. |
I said I would get the tests done last week but the tests have shown up more work. I'll get back to this as time permits, hopefully this week. |
Excellent, please name me here when it's ready for the review, and we roll out a new release. Thank you! |
Hey @westbury any updates on this? :) |
See eclipse-theia/theia#8221 . That PR may obsolete this one. |
This is the fix for eclipse-theia/theia#7789 .
If a file is created, then staged, then deleted, it is still staged for add (being in the index) and will be included in the commit. Changes that have been made to the working tree but not staged will not be included in the commit, this includes the deletion of the file.
In this screenshot Untitled2.txt is now shown added in the staged area and deleted in the unstaged area. Before it was not shown in either area, even though the add was being included in the commit.