Compile function SRP_Git_Listener(Message,OrigEntid,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,Arg10,Arg11,Arg12,Arg13,Arg14,Arg15,Arg16,Arg17,Arg18,Arg19,Arg20)
#pragma precomp SRP_PreCompiler
    
Declare function   SRP_Git_Services, SRP_Git_Redirect, Status
Declare subroutine SRP_Git_Serializer, Set_Status

Common /SRP_Git_Listener/ SRPGitListener_Suppress@

If SRPGitListener_Suppress@ NE 1 then
    Name = OrigEntId[-1, "B*"]
    If Name[1, 16] _NEC "SRP_EDITOR_TEMP_" AND Name[-14, 14] _NEC "__SRP_GIT_TEMP" then
        Begin Case
                       
            Case Message _EQC 'UPDATE'
                
                If SRP_Git_Services("IsEnabled") AND Assigned(Arg1) then
                    SRP_Git_Serializer('Write', OrigEntId, Arg1, SRP_Git_Services("GetRepoPath"))
                end
            
            Case Message _EQC 'WRITE' OR Message _EQC 'NEW'
                
                If SRP_Git_Services("IsEnabled") AND Assigned(Arg10) then
                    // Ignore APPROW entities whose contents are the same as it's key
                    If Field(OrigEntId, "*", 2, 1) EQ "APPROW" AND Arg10 _EQC OrigEntId[-1, "B:"] else
                        SRP_Git_Serializer('Write', OrigEntId, Arg10, SRP_Git_Services("GetRepoPath"))
                    end
                end
                
            Case Message _EQC 'DESTROY' OR Message _EQC 'TDESTROY'
                
                If SRP_Git_Services("IsEnabled") then
                    SRP_Git_Serializer('Delete', OrigEntId, SRP_Git_Services("GetRepoPath"))
                end            
                
        End Case
    end
end
Ans = SRP_Git_Redirect(Message,OrigEntid,Arg1,Arg2,Arg3,Arg4,Arg5,Arg6,Arg7,Arg8,Arg9,Arg10,Arg11,Arg12,Arg13,Arg14,Arg15,Arg16,Arg17,Arg18,Arg19,Arg20)
    
Return Ans
