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 <spearce@spearce.org>
Shawn O. Pearce committed
Jan 21, 2007 at 04:28 UTC
6858efbda324ab30f8857a06000933bcc55b11cc
1 file changed
+3
-6
git-gui.sh
+3
-6
@@ -825,6 +825,7 @@ proc committer_ident {} {
825
826
proc commit_tree {} {
827
global HEAD commit_type file_states ui_comm repo_config
828
+ global ui_status_value pch_error
829
830
if {![lock_index update]} return
831
if {[committer_ident] eq {}} return
@@ -900,12 +901,8 @@ A good commit message has the following format:
901
return
902
}
903
903
- commit_prehook $curHEAD $msg
904
-}
905
-
906
-proc commit_prehook {curHEAD msg} {
907
- global ui_status_value pch_error
908
-
904
+ # -- Run the pre-commit hook.
905
+ #
906
set pchook [gitdir hooks pre-commit]
907
908
# On Cygwin [file executable] might lie so we need to ask