From: Shawn O. Pearce Date: Sun, 21 Jan 2007 09:28:22 +0000 (-0500) Subject: git-gui: Move commit_prehook into commit_tree. X-Git-Tag: gitgui-0.6.0~105 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6858efbda324ab30f8857a06000933bcc55b11cc;p=git.git git-gui: Move commit_prehook into commit_tree. The only reason the commit_prehook logic was broken out into its own proc was so it could be invoked after the current set of files that were already added to the commit could be refreshed if 'Allow Partially Added Files' was set to false. Now that we no longer even offer that option to the user there is no reason to keep this code broken out into its own procedure. Signed-off-by: Shawn O. Pearce --- diff --git a/git-gui.sh b/git-gui.sh index e82eb6bbe..e4676bf79 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -825,6 +825,7 @@ proc committer_ident {} { proc commit_tree {} { global HEAD commit_type file_states ui_comm repo_config + global ui_status_value pch_error if {![lock_index update]} return if {[committer_ident] eq {}} return @@ -900,12 +901,8 @@ A good commit message has the following format: return } - commit_prehook $curHEAD $msg -} - -proc commit_prehook {curHEAD msg} { - global ui_status_value pch_error - + # -- Run the pre-commit hook. + # set pchook [gitdir hooks pre-commit] # On Cygwin [file executable] might lie so we need to ask