-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix Source Control File Names With Spaces #1858
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
Fix Source Control File Names With Spaces #1858
Conversation
CodeEdit/Features/UtilityArea/TerminalUtility/UtilityAreaTerminalView.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small tweaks needed. Also, why was LICENSE.md renamed to LICENSE2.md?
CodeEdit/Features/Documents/WorkspaceDocument/WorkspaceDocument.swift
Outdated
Show resolved
Hide resolved
...gatorArea/SourceControlNavigator/Changes/Views/SourceControlNavigatorChangesCommitView.swift
Outdated
Show resolved
Hide resolved
...it/Features/NavigatorArea/SourceControlNavigator/Views/ChangedFile/GitChangedFileLabel.swift
Show resolved
Hide resolved
Haha whoops, I made another PR fixing some renaming stuff and renamed that file in the demo video. |
Co-authored-by: Tom Ludwig <tommludwig@icloud.com>
…lwinter/CodeEdit into fix/source-control-spaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ship it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is some really nice work!
Description
Main Changes
GitChangedFiles orURLs instead ofCEWorkspaceFiles. TheCEWorkspaceFilescreated 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.GitChangedFileto 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.GitClient. getChangedFilesandGitClient. getStagedFileswithGitClient. getStatus. Also adds aStatusstruct to theGitClient. This new method uses the porcelain v2 version ofgit statusto fetch more information per file. It also uses the-zoption to get a easily-readable format.GitChangedFileorURLin place ofCEWorkspaceFIlewhere possible and only fetchCEWorkspaceFiles when necessary.This also sets up the required changes to view file renames correctly in source control lists.
Other Changes
GitClient. getCommitHistoryto 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 namedmainon themainbranch).GitTypetoGitStatus.GitClientand logs errors in a few key methods./caused issues when using relative URLs.GitClient.addandGitClient.resetto use quoted, relative, paths.Related Issues
Checklist
Screenshots
Before:
Screen.Recording.2024-08-24.at.5.32.02.PM.mov
After:
Screen.Recording.2024-08-24.at.5.33.06.PM.mov