Skip to content

Commit a17f25c

Browse files
committed
Correct hook execution order
1 parent a6a0fd7 commit a17f25c

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

isc/git/hook/Manager.cls

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

26-
/// Execute global hooks
27-
do ..executeInternal(.hooks, method, "isc.git.hook.Global")
26+
if (method="before") {
2827

29-
/// Execute local hooks
30-
do ..executeInternal(.hooks, method, "isc.git.hook.Local")
28+
/// Execute global hooks
29+
do ..executeInternal(.hooks, method, "isc.git.hook.Global")
30+
31+
/// Execute local hooks
32+
do ..executeInternal(.hooks, method, "isc.git.hook.Local")
33+
} elseif (method="after") {
34+
/// Execute local hooks
35+
do ..executeInternal(.hooks, method, "isc.git.hook.Local")
36+
37+
/// Execute global hooks
38+
do ..executeInternal(.hooks, method, "isc.git.hook.Global")
39+
}
3140
} catch ex {
3241
set sc = ex.AsStatus()
3342
}

0 commit comments

Comments
 (0)