Skip to content

Commit

Permalink
small change to let git diff work with filepaths containing spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
a-guiducci committed May 5, 2023
1 parent e0201d3 commit c401f8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pii_check/pii_check_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get_diff(filename: str) -> PatchSet:
:param filename: a filename
:return: the content to check
"""
diff = subprocess.getstatusoutput(f"git diff --cached {filename}")[1]
diff = subprocess.getstatusoutput(f"git diff --cached '{filename}'")[1]
return PatchSet(StringIO(diff))


Expand Down

0 comments on commit c401f8e

Please sign in to comment.