Skip to content
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
9 changes: 5 additions & 4 deletions git-webui/release/share/git-webui/webui/js/git-webui.js
Original file line number Diff line number Diff line change
Expand Up @@ -2238,7 +2238,9 @@ webui.ChangedFilesView = function(workspaceView, type, label) {
}
removeUnavailableModal(popup);
if(action == 'discard'){
self.cancel()
self.cancel();
} else if(action == 'stash'){
self.stash();
}
else{
self.process();
Expand Down Expand Up @@ -2345,18 +2347,17 @@ webui.ChangedFilesView = function(workspaceView, type, label) {

if(combinedFiles.length>0)
confirmActionForUnavailableFile(combinedFiles, action);
workspaceView.update("stash");

}

self.stash = function() {
var files = self.getFileList(undefined, "D", 0, 1);
var rmFiles = self.getFileList("D", undefined, 0, 1);
var combinedFiles = files+" "+rmFiles;
var combinedFiles = files.concat(rmFiles);

if(combinedFiles.length != 0){
webui.git("stash push -- " + combinedFiles, function(output){
webui.showSuccess(output);
workspaceView.update("stash");
});
}
}
Expand Down
9 changes: 5 additions & 4 deletions git-webui/src/share/git-webui/webui/js/git-webui.js
Original file line number Diff line number Diff line change
Expand Up @@ -2238,7 +2238,9 @@ webui.ChangedFilesView = function(workspaceView, type, label) {
}
removeUnavailableModal(popup);
if(action == 'discard'){
self.cancel()
self.cancel();
} else if(action == 'stash'){
self.stash();
}
else{
self.process();
Expand Down Expand Up @@ -2345,18 +2347,17 @@ webui.ChangedFilesView = function(workspaceView, type, label) {

if(combinedFiles.length>0)
confirmActionForUnavailableFile(combinedFiles, action);
workspaceView.update("stash");

}

self.stash = function() {
var files = self.getFileList(undefined, "D", 0, 1);
var rmFiles = self.getFileList("D", undefined, 0, 1);
var combinedFiles = files+" "+rmFiles;
var combinedFiles = files.concat(rmFiles);

if(combinedFiles.length != 0){
webui.git("stash push -- " + combinedFiles, function(output){
webui.showSuccess(output);
workspaceView.update("stash");
});
}
}
Expand Down