diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2006-11-12 18:08:10 -0500 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2006-11-13 00:10:39 -0500 |
commit | c8ebafd84537473bb8a53880a6a6740d723b83bc (patch) | |
tree | 5ff41b9a0c4401573e70af815f85cd9d5b554c57 /git-gui | |
parent | 333b0c74b33fe54f0489813950345edbeb62c0b5 (diff) | |
download | git-c8ebafd84537473bb8a53880a6a6740d723b83bc.tar.gz git-c8ebafd84537473bb8a53880a6a6740d723b83bc.tar.xz |
git-gui: Added post-commit invocation after the commit is done.
Since git-commit.sh invokes hooks/post-commit after running git rerere
we should do the same if its available and executable.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui')
-rwxr-xr-x | git-gui | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -793,7 +793,7 @@ proc commit_stage2 {curHEAD msg} { } 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 @@ -870,6 +870,21 @@ proc commit_stage3 {fd_wt curHEAD msg} { 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 |