summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 333b0c7)
raw | patch | inline | side by side (parent: 333b0c7)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 12 Nov 2006 23:08:10 +0000 (18:08 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 13 Nov 2006 05:10:39 +0000 (00:10 -0500) |
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>
we should do the same if its available and executable.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | patch | blob | history |
index 3ccf0a41deb7e60b7294b3879db71e796264b8f6..7eeff9061cde87ebe5a870231e0da8d35dc246ee 100755 (executable)
--- a/git-gui
+++ b/git-gui
}
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