@@ -76,7 +76,7 @@ def hook_path(name: str, git_dir: PathLike) -> str:
7676 return osp .join (git_dir , "hooks" , name )
7777
7878
79- def _has_file_extension (path ) :
79+ def _has_file_extension (path : str ) -> str :
8080 return osp .splitext (path )[1 ]
8181
8282
@@ -102,7 +102,7 @@ def run_commit_hook(name: str, index: "IndexFile", *args: str) -> None:
102102 relative_hp = Path (hp ).relative_to (index .repo .working_dir ).as_posix ()
103103 cmd = ["bash.exe" , relative_hp ]
104104
105- cmd = subprocess .Popen (
105+ process = subprocess .Popen (
106106 cmd + list (args ),
107107 env = env ,
108108 stdout = subprocess .PIPE ,
@@ -116,13 +116,13 @@ def run_commit_hook(name: str, index: "IndexFile", *args: str) -> None:
116116 else :
117117 stdout_list : List [str ] = []
118118 stderr_list : List [str ] = []
119- handle_process_output (cmd , stdout_list .append , stderr_list .append , finalize_process )
119+ handle_process_output (process , stdout_list .append , stderr_list .append , finalize_process )
120120 stdout = "" .join (stdout_list )
121121 stderr = "" .join (stderr_list )
122- if cmd .returncode != 0 :
122+ if process .returncode != 0 :
123123 stdout = force_text (stdout , defenc )
124124 stderr = force_text (stderr , defenc )
125- raise HookExecutionError (hp , cmd .returncode , stderr , stdout )
125+ raise HookExecutionError (hp , process .returncode , stderr , stdout )
126126 # end handle return code
127127
128128
@@ -394,7 +394,6 @@ def aggressive_tree_merge(odb: "GitCmdObjectDB", tree_shas: Sequence[bytes]) ->
394394 out .append (_tree_entry_to_baseindexentry (theirs , 0 ))
395395 # END handle modification
396396 else :
397-
398397 if ours [0 ] != base [0 ] or ours [1 ] != base [1 ]:
399398 # they deleted it, we changed it, conflict
400399 out .append (_tree_entry_to_baseindexentry (base , 1 ))
0 commit comments