}
proc commit_stage3 {fd_wt curHEAD msg} {
- global single_commit gitdir HEAD PARENT commit_type
+ global single_commit gitdir HEAD PARENT commit_type tcl_platform
global ui_status_value ui_comm
global file_states
catch {exec git rerere}
}
+ # -- Run the post-commit hook.
+ #
+ set pchook [file join $gitdir hooks post-commit]
+ if {$tcl_platform(platform) == {windows} && [file isfile $pchook]} {
+ set pchook [list sh -c [concat \
+ "if test -x \"$pchook\";" \
+ "then exec \"$pchook\";" \
+ "fi"]]
+ } elseif {![file executable $pchook]} {
+ set pchook {}
+ }
+ if {$pchook != {}} {
+ catch {exec $pchook &}
+ }
+
$ui_comm delete 0.0 end
$ui_comm edit modified false
$ui_comm edit reset