Skip to content

Commit

Permalink
don't recompute relative to root
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Jun 25, 2023
1 parent 996770c commit d017a02
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/black/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,7 @@ def _path_is_ignored(
except ValueError:
break
if pattern.match_file(relative_path):
report.path_ignored(
path.relative_to(root), "matches a .gitignore file content"
)
report.path_ignored(root_relative_path, "matches a .gitignore file content")
return True
return False

Expand Down

0 comments on commit d017a02

Please sign in to comment.