-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Source Control File Names With Spaces (#1858)
Main Changes - Modifies the GitClient to use `GitChangedFile`s or `URL`s instead of `CEWorkspaceFile`s. The `CEWorkspaceFiles` created by these methods were disconnected from the workspace's file manager and it becomes messy to store things like old file names (in the case of renames) and the staged and unstaged statuses. - Updates `GitChangedFile` to be able to much more accurately represent a git file change. It now tracks two statuses, provides multiple helper methods and properties for use in UI. - Replaces `GitClient. getChangedFiles` and `GitClient. getStagedFiles` with `GitClient. getStatus`. Also adds a `Status` struct to the `GitClient`. This new method uses the porcelain v2 version of `git status` to fetch more information per file. It also uses the `-z` option to get a easily-readable format. - Updates related UI to use `GitChangedFile` or `URL` in place of `CEWorkspaceFIle` where possible and only fetch `CEWorkspaceFile`s when necessary. This also sets up the required changes to view file renames correctly in source control lists. Other Changes - Fixed file statuses toggling on and off when files are saved. - Updates `GitClient. getCommitHistory` to correctly specify the branch name and file. Fixes an untracked bug where a file with the same name as a branch would cause an error (eg a file named `main` on the `main` branch). - Renames `GitType` to `GitStatus`. - Adds a logger to the `GitClient` and logs errors in a few key methods. - Fixes a small bug with the workspace document where the URL would not have a trailing `/` caused issues when using relative URLs. - Consolidates list view rows for git changes into one View that's reused in a few different lists. - Updates `GitClient.add` and `GitClient.reset` to use quoted, relative, paths. --------- Co-authored-by: Tom Ludwig <[email protected]>
- Loading branch information
1 parent
02b6919
commit a78e586
Showing
24 changed files
with
520 additions
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.