Skip to content

Commit d37a062

Browse files
committed
Add stashing message
1 parent 13714cb commit d37a062

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

cls/SourceControl/Git/DiscardState.cls

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Property Timestamp As %TimeStamp [ Required ];
1616
Property ExternalFile As %Boolean [ Required ];
1717

1818
// Boolean tracking whether or not file was deleted as part of change
19+
1920
Property Deleted As %Boolean;
2021

2122
Index BranchMap On Branch [ Type = bitmap ];
@@ -139,6 +140,9 @@ Storage Default
139140
<Value name="9">
140141
<Value>ExternalFile</Value>
141142
</Value>
143+
<Value name="10">
144+
<Value>Deleted</Value>
145+
</Value>
142146
</Data>
143147
<DataLocation>^SourceControl22B9.DiscardStateD</DataLocation>
144148
<DefaultData>DiscardStateDefaultData</DefaultData>

git-webui/release/share/git-webui/webui/js/git-webui.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3005,11 +3005,17 @@ webui.NewChangedFilesView = function(workspaceView) {
30053005

30063006
self.stash = function() {
30073007
var selectedFilesAsString = selectedItems.join(" ");
3008-
webui.git("add -- " + selectedFilesAsString, function(output) {
3008+
webui.git("add -- " + selectedFilesAsString, undefined, function(output) {
30093009
webui.git("stash push --include-untracked -- " + selectedFilesAsString, function(output) {
30103010
webui.showSuccess(output);
30113011
workspaceView.update();
30123012
});
3013+
},function(output) {
3014+
if (output.includes("did not match any files")) {
3015+
webui.showError("Stashing deleted items does not work. Please discard the operation instead.")
3016+
} else {
3017+
webui.showError(output);
3018+
}
30133019
});
30143020
}
30153021

git-webui/src/share/git-webui/webui/js/git-webui.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3005,11 +3005,17 @@ webui.NewChangedFilesView = function(workspaceView) {
30053005

30063006
self.stash = function() {
30073007
var selectedFilesAsString = selectedItems.join(" ");
3008-
webui.git("add -- " + selectedFilesAsString, function(output) {
3008+
webui.git("add -- " + selectedFilesAsString, undefined, function(output) {
30093009
webui.git("stash push --include-untracked -- " + selectedFilesAsString, function(output) {
30103010
webui.showSuccess(output);
30113011
workspaceView.update();
30123012
});
3013+
},function(output) {
3014+
if (output.includes("did not match any files")) {
3015+
webui.showError("Stashing deleted items does not work. Please discard the operation instead.")
3016+
} else {
3017+
webui.showError(output);
3018+
}
30133019
});
30143020
}
30153021

0 commit comments

Comments
 (0)