On Windows, root_path (from git rev-parse) returns a path with Unix path separators, and is appended onto each file from git diff. This results in files and changed_file_list having common paths, but with different separators, making the AND operation fail. The quick solution would be to use os.path.abspath on changed_file_list instead of appending root_path, or use os.path.normpath on changed_file_list after appending root_path.