X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/436e12f2904e68acb57a059b1c44f1e0321e2d3f..138769aa27d6bd86507a0cd98d9a5bf8f63a8e99:/scripts/migrate-black.py diff --git a/scripts/migrate-black.py b/scripts/migrate-black.py index 5a6bc42..ff52939 100755 --- a/scripts/migrate-black.py +++ b/scripts/migrate-black.py @@ -5,7 +5,7 @@ import logging import os import sys -from subprocess import check_output, run, Popen, PIPE +from subprocess import PIPE, Popen, check_output, run def git(*args: str) -> str: @@ -16,7 +16,7 @@ def blackify(base_branch: str, black_command: str, logger: logging.Logger) -> in current_branch = git("branch", "--show-current") if not current_branch or base_branch == current_branch: - logger.error("You need to check out a feature brach to work on") + logger.error("You need to check out a feature branch to work on") return 1 if not os.path.exists(".git"): @@ -49,6 +49,7 @@ def blackify(base_branch: str, black_command: str, logger: logging.Logger) -> in [ "git", "diff", + "--binary", "--find-copies", "%s-black..%s-black" % (last_commit, commit), ],