throw out all of your changes, regardless of filetype or directory using git restore. combine a directory and a file type with git restore src/site/.md. md to discard all of your changes to Markdown files. use an asterisk as a wildcard with git restore. While an ideal solution would be an asynchronous version of moveItemToTrash and a version of it that accepts an array of files to move to trash this will at least solve the immediate problem. You can: discard changes within a folder/directory with git restore src/site, for example. To combat this I've implemented a work queue that schedules synchronous work with a high priority across as many animation frames as needed. In the left sidebar, in the 'Changes' tab, click Stashed Changes. In a scenario like the one described in #1889 that could end up locking the app completely for a over a minute, or more. Restoring stashed changes If you are not already on the branch where the changes are stashed, in the repository bar, click Current Branch, then click the branch with stashed changes. Since we were calling this in a loop without yielding to the browser for all the files that needed to be discarded we were effectively locking the app, making it unresponsive until all those operations where executed. Checkout all the files that we've discarded that existed in the previous commit from the index.Įlectron's moveItemToTrash function which we're using is synchronous and seems to take 20+ ms per file to run on my machine (Windows).Figure out if any of the files that we've been asked to discard are changed in the index and if so, reset them such that the index is set up just as the previous commit for the paths we're discarding.For users who exclusive interact with Git using Desktop this will almost always empty which, as it turns out, is great for us. The discard changes option available in the context menu no longer works, both for single changes and 'discard all' functionality. Figure out what the index thinks has changed as compared to the previous commit.So we're doing our discards in three conceptual steps. We're trying to not invoke git linearly with the number of files to discard This changes our discard changes logic from our current approach of resetting the entire index and calling git checkout with a potentially too long (see #1668) argument list of files to instead carefully partially resetting the index and then using checkout-index with a set of files passed on stdin.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |