From f99cf1962d9725670bf67caec43257bc0149770a Mon Sep 17 00:00:00 2001 From: Alexander Koblov Date: Fri, 8 Apr 2016 18:23:55 +0300 Subject: [PATCH] now generated classes are ignored by source control hook fixes #36 --- %SourceControl/Git/Utils.cls.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/%SourceControl/Git/Utils.cls.xml b/%SourceControl/Git/Utils.cls.xml index 0caa0c4..8161c65 100644 --- a/%SourceControl/Git/Utils.cls.xml +++ b/%SourceControl/Git/Utils.cls.xml @@ -660,7 +660,12 @@ projectName without extension #dim type As %String = ..Type(InternalName) if type = "cls" { - set isInSourceControl = ..FindInPackages(InternalName, .sourceControlItem) + #define StripExtension(%s) $Piece(%s,".",1,*-1) + if InternalName'="" && ($$$defClassKeyGet($$$StripExtension(InternalName),$$$cCLASSgeneratedby)'="") { + set isInSourceControl = 0 // skip generated classes + } else { + set isInSourceControl = ..FindInPackages(InternalName, .sourceControlItem) + } } elseif type = "csp" { if $Extract(InternalName) '= "/" { set InternalName = "/" _ InternalName