-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
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
Outdated
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
GitChangedFile
s orURL
s instead ofCEWorkspaceFile
s. TheCEWorkspaceFiles
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.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.GitClient. getChangedFiles
andGitClient. getStagedFiles
withGitClient. getStatus
. Also adds aStatus
struct to theGitClient
. This new method uses the porcelain v2 version ofgit status
to fetch more information per file. It also uses the-z
option to get a easily-readable format.GitChangedFile
orURL
in place ofCEWorkspaceFIle
where possible and only fetchCEWorkspaceFile
s when necessary.This also sets up the required changes to view file renames correctly in source control lists.
Other Changes
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 namedmain
on themain
branch).GitType
toGitStatus
.GitClient
and logs errors in a few key methods./
caused issues when using relative URLs.GitClient.add
andGitClient.reset
to 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