@@ -76,6 +76,8 @@ def _ns(
7676 remote_name : str | None = None ,
7777 remote_url : str | None = None ,
7878 commit_msg_filename : str | None = None ,
79+ prepare_commit_message_source : str | None = None ,
80+ commit_object_name : str | None = None ,
7981 checkout_type : str | None = None ,
8082 is_squash_merge : str | None = None ,
8183 rewrite_command : str | None = None ,
@@ -90,6 +92,8 @@ def _ns(
9092 remote_name = remote_name ,
9193 remote_url = remote_url ,
9294 commit_msg_filename = commit_msg_filename ,
95+ prepare_commit_message_source = prepare_commit_message_source ,
96+ commit_object_name = commit_object_name ,
9397 all_files = all_files ,
9498 checkout_type = checkout_type ,
9599 is_squash_merge = is_squash_merge ,
@@ -202,8 +206,20 @@ def _run_ns(
202206 _check_args_length (hook_type , args )
203207 if hook_type == 'pre-push' :
204208 return _pre_push_ns (color , args , stdin )
205- elif hook_type in { 'commit-msg' , 'prepare-commit-msg' } :
209+ elif hook_type in 'commit-msg' :
206210 return _ns (hook_type , color , commit_msg_filename = args [0 ])
211+ elif hook_type == 'prepare-commit-msg' and len (args ) == 1 :
212+ return _ns (hook_type , color , commit_msg_filename = args [0 ])
213+ elif hook_type == 'prepare-commit-msg' and len (args ) == 2 :
214+ return _ns (
215+ hook_type , color , commit_msg_filename = args [0 ],
216+ prepare_commit_message_source = args [1 ],
217+ )
218+ elif hook_type == 'prepare-commit-msg' and len (args ) == 3 :
219+ return _ns (
220+ hook_type , color , commit_msg_filename = args [0 ],
221+ prepare_commit_message_source = args [1 ], commit_object_name = args [2 ],
222+ )
207223 elif hook_type in {'post-commit' , 'pre-merge-commit' , 'pre-commit' }:
208224 return _ns (hook_type , color )
209225 elif hook_type == 'post-checkout' :
0 commit comments