Skip to content

Workspace view displays filenames with spaces #568

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

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Production configuration page no longer closes Sync/WebUI when operations there change the production (#542)
- Remove leading/trailing spaces from input to Configure() (#356)
- Fix branches with special characters not showing in GitUI (#523)
- Fix filenames with spaces not showing correctly in workspace view (#551)
- Removed inaccurate placeholder text for commit message in UI (#406)

## [2.6.0] - 2024-10-07
Expand Down
10 changes: 2 additions & 8 deletions git-webui/release/share/git-webui/webui/js/git-webui.js
Original file line number Diff line number Diff line change
Expand Up @@ -2560,16 +2560,10 @@ webui.NewChangedFilesView = function(workspaceView) {
} else {
model = line;
}
model = model.replace(/^"(.*)"$/g,'$1');
model = model.replace(/^"(.*)"$/g,'$1').trim();

++self.filesCount;
var isForCurrentUser;
if(model.indexOf(" ") > -1){
isForCurrentUser = (uncommittedItems.indexOf(model.substring(1, model.length-1)) > -1);
} else {
isForCurrentUser = (uncommittedItems.indexOf(model) > -1);
}

var isForCurrentUser = (uncommittedItems.indexOf(model) > -1);
if (isForCurrentUser) {
addItemToFileList(fileList, indexStatus, workingTreeStatus, model, false);
} else {
Expand Down
10 changes: 2 additions & 8 deletions git-webui/src/share/git-webui/webui/js/git-webui.js
Original file line number Diff line number Diff line change
Expand Up @@ -2560,16 +2560,10 @@ webui.NewChangedFilesView = function(workspaceView) {
} else {
model = line;
}
model = model.replace(/^"(.*)"$/g,'$1');
model = model.replace(/^"(.*)"$/g,'$1').trim();

++self.filesCount;
var isForCurrentUser;
if(model.indexOf(" ") > -1){
isForCurrentUser = (uncommittedItems.indexOf(model.substring(1, model.length-1)) > -1);
} else {
isForCurrentUser = (uncommittedItems.indexOf(model) > -1);
}

var isForCurrentUser = (uncommittedItems.indexOf(model) > -1);
if (isForCurrentUser) {
addItemToFileList(fileList, indexStatus, workingTreeStatus, model, false);
} else {
Expand Down
Loading