@@ -86,7 +86,7 @@ func (self *WorkingTreeHelper) OpenMergeTool() error {
8686	return  nil 
8787}
8888
89- func  (self  * WorkingTreeHelper ) HandleCommitPressWithMessage (initialMessage  string ) error  {
89+ func  (self  * WorkingTreeHelper ) HandleCommitPressWithMessage (initialMessage  string ,  forceSkipHooks   bool ) error  {
9090	return  self .WithEnsureCommittableFiles (func () error  {
9191		self .commitsHelper .OpenCommitMessagePanel (
9292			& OpenCommitMessagePanelOpts {
@@ -95,25 +95,29 @@ func (self *WorkingTreeHelper) HandleCommitPressWithMessage(initialMessage strin
9595				SummaryTitle :     self .c .Tr .CommitSummaryTitle ,
9696				DescriptionTitle : self .c .Tr .CommitDescriptionTitle ,
9797				PreserveMessage :  true ,
98- 				OnConfirm :        self .handleCommit ,
99- 				OnSwitchToEditor : self .switchFromCommitMessagePanelToEditor ,
98+ 				OnConfirm : func (summary  string , description  string ) error  {
99+ 					return  self .handleCommit (summary , description , forceSkipHooks )
100+ 				},
101+ 				OnSwitchToEditor : func (filepath  string ) error  {
102+ 					return  self .switchFromCommitMessagePanelToEditor (filepath , forceSkipHooks )
103+ 				},
100104			},
101105		)
102106
103107		return  nil 
104108	})
105109}
106110
107- func  (self  * WorkingTreeHelper ) handleCommit (summary  string , description  string ) error  {
108- 	cmdObj  :=  self .c .Git ().Commit .CommitCmdObj (summary , description )
111+ func  (self  * WorkingTreeHelper ) handleCommit (summary  string , description  string ,  forceSkipHooks   bool ) error  {
112+ 	cmdObj  :=  self .c .Git ().Commit .CommitCmdObj (summary , description ,  forceSkipHooks )
109113	self .c .LogAction (self .c .Tr .Actions .Commit )
110114	return  self .gpgHelper .WithGpgHandling (cmdObj , self .c .Tr .CommittingStatus , func () error  {
111115		self .commitsHelper .OnCommitSuccess ()
112116		return  nil 
113117	})
114118}
115119
116- func  (self  * WorkingTreeHelper ) switchFromCommitMessagePanelToEditor (filepath  string ) error  {
120+ func  (self  * WorkingTreeHelper ) switchFromCommitMessagePanelToEditor (filepath  string ,  forceSkipHooks   bool ) error  {
117121	// We won't be able to tell whether the commit was successful, because 
118122	// RunSubprocessAndRefresh doesn't return the error (it opens an error alert 
119123	// itself and returns nil on error). But even if we could, we wouldn't have 
@@ -124,7 +128,7 @@ func (self *WorkingTreeHelper) switchFromCommitMessagePanelToEditor(filepath str
124128
125129	self .c .LogAction (self .c .Tr .Actions .Commit )
126130	return  self .c .RunSubprocessAndRefresh (
127- 		self .c .Git ().Commit .CommitInEditorWithMessageFileCmdObj (filepath ),
131+ 		self .c .Git ().Commit .CommitInEditorWithMessageFileCmdObj (filepath ,  forceSkipHooks ),
128132	)
129133}
130134
@@ -140,12 +144,7 @@ func (self *WorkingTreeHelper) HandleCommitEditorPress() error {
140144}
141145
142146func  (self  * WorkingTreeHelper ) HandleWIPCommitPress () error  {
143- 	skipHookPrefix  :=  self .c .UserConfig ().Git .SkipHookPrefix 
144- 	if  skipHookPrefix  ==  ""  {
145- 		return  errors .New (self .c .Tr .SkipHookPrefixNotConfigured )
146- 	}
147- 
148- 	return  self .HandleCommitPressWithMessage (skipHookPrefix )
147+ 	return  self .HandleCommitPressWithMessage ("" , true )
149148}
150149
151150func  (self  * WorkingTreeHelper ) HandleCommitPress () error  {
@@ -173,7 +172,7 @@ func (self *WorkingTreeHelper) HandleCommitPress() error {
173172		}
174173	}
175174
176- 	return  self .HandleCommitPressWithMessage (message )
175+ 	return  self .HandleCommitPressWithMessage (message ,  false )
177176}
178177
179178func  (self  * WorkingTreeHelper ) WithEnsureCommittableFiles (handler  func () error ) error  {
0 commit comments