Skip to content

Commit 47b25c7

Browse files
committed
fix deleting production items deletes file from source control
1 parent 67b1995 commit 47b25c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cls/SourceControl/Git/Extension.cls

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,10 @@ Method OnAfterSave(InternalName As %String, Object As %RegisteredObject = {$$$NU
282282
set key = $order(productionItems(""))
283283
while (key '= "") {
284284
if productionItems(key) = "D" {
285-
set itemFilename = ..ExternalName(key)
286-
if ##class(SourceControl.Git.Utils).IsInSourceControl(InternalName) && ##class(%File).Exists(itemFilename) {
287-
$$$ThrowOnError(##class(SourceControl.Git.Change).AddDeletedToUncommitted(itemFilename, InternalName))
288-
$$$ThrowOnError(##class(SourceControl.Git.Utils).DeleteExternalFile(InternalName))
285+
set itemFilename = ..FullExternalName(key)
286+
if ##class(SourceControl.Git.Utils).IsInSourceControl(key) && ##class(%File).Exists(itemFilename) {
287+
$$$ThrowOnError(##class(SourceControl.Git.Change).AddDeletedToUncommitted(itemFilename, key))
288+
$$$ThrowOnError(##class(SourceControl.Git.Utils).DeleteExternalFile(key))
289289
}
290290
} elseif '..IsInSourceControl(key) {
291291
$$$ThrowOnError(##class(SourceControl.Git.Utils).AddToSourceControl(key))

0 commit comments

Comments
 (0)