File tree Expand file tree Collapse file tree 3 files changed +18
-2
lines changed
release/share/git-webui/webui/js
src/share/git-webui/webui/js Expand file tree Collapse file tree 3 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ Property Timestamp As %TimeStamp [ Required ];
16
16
Property ExternalFile As %Boolean [ Required ];
17
17
18
18
// Boolean tracking whether or not file was deleted as part of change
19
+
19
20
Property Deleted As %Boolean ;
20
21
21
22
Index BranchMap On Branch [ Type = bitmap ];
@@ -139,6 +140,9 @@ Storage Default
139
140
<Value name =" 9" >
140
141
<Value >ExternalFile </Value >
141
142
</Value >
143
+ <Value name =" 10" >
144
+ <Value >Deleted </Value >
145
+ </Value >
142
146
</Data >
143
147
<DataLocation >^SourceControl22B9 .DiscardStateD </DataLocation >
144
148
<DefaultData >DiscardStateDefaultData </DefaultData >
Original file line number Diff line number Diff line change @@ -3005,11 +3005,17 @@ webui.NewChangedFilesView = function(workspaceView) {
3005
3005
3006
3006
self . stash = function ( ) {
3007
3007
var selectedFilesAsString = selectedItems . join ( " " ) ;
3008
- webui . git ( "add -- " + selectedFilesAsString , function ( output ) {
3008
+ webui . git ( "add -- " + selectedFilesAsString , undefined , function ( output ) {
3009
3009
webui . git ( "stash push --include-untracked -- " + selectedFilesAsString , function ( output ) {
3010
3010
webui . showSuccess ( output ) ;
3011
3011
workspaceView . update ( ) ;
3012
3012
} ) ;
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
+ }
3013
3019
} ) ;
3014
3020
}
3015
3021
Original file line number Diff line number Diff line change @@ -3005,11 +3005,17 @@ webui.NewChangedFilesView = function(workspaceView) {
3005
3005
3006
3006
self . stash = function ( ) {
3007
3007
var selectedFilesAsString = selectedItems . join ( " " ) ;
3008
- webui . git ( "add -- " + selectedFilesAsString , function ( output ) {
3008
+ webui . git ( "add -- " + selectedFilesAsString , undefined , function ( output ) {
3009
3009
webui . git ( "stash push --include-untracked -- " + selectedFilesAsString , function ( output ) {
3010
3010
webui . showSuccess ( output ) ;
3011
3011
workspaceView . update ( ) ;
3012
3012
} ) ;
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
+ }
3013
3019
} ) ;
3014
3020
}
3015
3021
You can’t perform that action at this time.
0 commit comments