Skip to content

Commit

Permalink
Correct hook execution order
Browse files Browse the repository at this point in the history
  • Loading branch information
eduard93 committed Mar 29, 2018
1 parent a6a0fd7 commit a17f25c
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions isc/git/hook/Manager.cls
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,20 @@ ClassMethod execute(directory As %String = "", ByRef hooks As %String = "", meth
do:directory'="" ..load(directory, .loadedHooks)
merge hooks = loadedHooks

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

/// Execute local hooks
do ..executeInternal(.hooks, method, "isc.git.hook.Local")
/// Execute global hooks
do ..executeInternal(.hooks, method, "isc.git.hook.Global")

/// Execute local hooks
do ..executeInternal(.hooks, method, "isc.git.hook.Local")
} elseif (method="after") {
/// Execute local hooks
do ..executeInternal(.hooks, method, "isc.git.hook.Local")

/// Execute global hooks
do ..executeInternal(.hooks, method, "isc.git.hook.Global")
}
} catch ex {
set sc = ex.AsStatus()
}
Expand Down

0 comments on commit a17f25c

Please sign in to comment.