Skip to content

Commit a6a0fd7

Browse files
committed
Fix for hooks management
1 parent b5faf92 commit a6a0fd7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

isc/git/hook/Manager.cls

+7-7
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,11 @@ ClassMethod execute(directory As %String = "", ByRef hooks As %String = "", meth
2323
do:directory'="" ..load(directory, .loadedHooks)
2424
merge hooks = loadedHooks
2525

26-
do ..log("Executing hooks, method: " _ method)
27-
2826
/// Execute global hooks
29-
do ..execute(hooks, method, "isc.git.hook.Global")
27+
do ..executeInternal(.hooks, method, "isc.git.hook.Global")
3028

3129
/// Execute local hooks
32-
do ..execute(hooks, method, "isc.git.hook.Local")
30+
do ..executeInternal(.hooks, method, "isc.git.hook.Local")
3331
} catch ex {
3432
set sc = ex.AsStatus()
3533
}
@@ -49,8 +47,10 @@ ClassMethod executeInternal(ByRef hooks As %String = "", method As %String(VALUE
4947
continue:class=type
5048
continue:((type="isc.git.hook.Local") && (..isDone(class)))
5149

52-
$$$TOE(sc, $classmethod(class, type))
53-
do:((type="isc.git.hook.Local") && (type="after")) ..add(class)
50+
do ..log("Executing hook class: " _ class)
51+
52+
$$$TOE(sc, $classmethod(class, method))
53+
do:((type="isc.git.hook.Local") && (method="after")) ..add(class)
5454
}
5555
}
5656

@@ -59,7 +59,7 @@ ClassMethod load(directory As %String, Output hooks As %String)
5959
{
6060
do ..log("Importing hooks dir " _ directory)
6161
set hooks = ""
62-
do $system.OBJ.ImportDir(directory, ##class(isc.git.GitLab).getExtWildcard(), "cukb", .errors, 1, .hooks)
62+
do $system.OBJ.ImportDir(directory, ##class(isc.git.GitLab).getExtWildcard(), "cukb /displaylog=0", .errors, 1, .hooks)
6363
throw:$get(errors,0)'=0 ##class(%Exception.General).%New("Hooks load error")
6464
}
6565

0 commit comments

Comments
 (0)