File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
patchwork/steps/CommitChanges Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ def run(self) -> dict:
128
128
repo = git .Repo (cwd , search_parent_directories = True )
129
129
repo_dir_path = Path (repo .working_tree_dir )
130
130
repo_changed_files = {repo_dir_path / item .a_path for item in repo .index .diff (None )}
131
+ repo_ignored_files = repo .ignored (* repo_changed_files )
132
+ repo_changed_files = repo_changed_files .difference (repo_ignored_files )
131
133
repo_untracked_files = {repo_dir_path / item for item in repo .untracked_files }
132
134
modified_files = {Path (modified_code_file ["path" ]).resolve () for modified_code_file in self .modified_code_files }
133
135
true_modified_files = modified_files .intersection (repo_changed_files .union (repo_untracked_files ))
@@ -150,7 +152,7 @@ def run(self) -> dict:
150
152
to_branch ,
151
153
):
152
154
for modified_file in true_modified_files :
153
- repo .git .add ("-f" , modified_file )
155
+ repo .git .add (modified_file )
154
156
commit_with_msg (repo , f"Patched { modified_file } " )
155
157
156
158
return dict (
You can’t perform that action at this time.
0 commit comments