Description
When a file is added to source control (e.g. "murks.int
") this is done internally by calling ##class(SourceControl.Git.Utils).AddToSourceControl()
which calls ##class(SourceControl.Git.Utils).NormalizeExtension()
to convert the file extension to lowercase and adds an entry to ^SYS("SourceControl","Git","items"...)
.
The function ##class(SourceControl.Git.Utils).GitStatus()
is called, too, and if an internal name is found to an external name, it sets an entry in ^SYS
after calling ##class(SourceControl.Git.Utils).NormalizeInternalName()
which converts the file extension to uppercase.
This leads to two entries in ^SYS
:
^SYS("SourceControl","Git","items","murks.INT") = ""
^SYS("SourceControl","Git","items","murks.int") = ""
Thus calling "Export All (Force)" exports each file twice.
Removing a file from source control with ##class(SourceControl.Git.Utils).RemoveFromSourceControl()
removes only the entry with lowercase extension, so "Export All (Force)" is still trying to export "murks.INT".
When the file is deleted, "Export All (Force)" will fail, because it cannot find the file though it is listed in ^SYS
In order to have this work consistently ##class(SourceControl.Git.Utils).NormalizeInternalName()
should convert the extension to lowercase, too.
Before:
if ($extract(name) '= "/") && (type'="csp") { quit $piece(name,".",1,*-1)_"."_$zconvert($piece(name,".",*),"U") }
After:
if ($extract(name) '= "/") && (type'="csp") { quit $piece(name,".",1,*-1)_"."_$zconvert($piece(name,".",*),"L") }
Activity
RalphGauer-Paul commentedon Apr 1, 2025
There seems to be more to this.
I have to investigate other places with zconvert.
Commiting classes from VSCode does not work with this change only.
RalphGauer-Paul commentedon Apr 1, 2025
Letting
##class(SourceControl.Git.Utils).NormalizeInternalName()
as it was before (with conversion to uppercase)and change
##class(SourceControl.Git.Utils).GitStatus()
instead:This way committing classes is working, too, and duplicate entries are avoided.