Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved Problem with Non-ASCII .gitignore Files #2229

Merged
merged 12 commits into from May 24, 2021
Merged

Solved Problem with Non-ASCII .gitignore Files #2229

merged 12 commits into from May 24, 2021

Commits on May 13, 2021

  1. Solved Problem with non-alphabetical .gitignore files

    When .gitignore file in the user's project directory contained non-alphabetical characters(Japanese, Korean, Chinese, etc), Nothing works and printed this weird message in the console('cp949' is the encoding for Korean characters in this case). It even blocks VSCode's formatting from working. This commit solves the problem.
    
    Traceback (most recent call last):
      File "c:\users\username\anaconda3\envs\project-name\lib\runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "c:\users\username\anaconda3\envs\project-name\lib\runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "C:\Users\username\anaconda3\envs\project-name\Scripts\black.exe\__main__.py", line 7, in <module>
      File "c:\users\username\anaconda3\envs\project-name\lib\site-packages\black\__init__.py", line 1056, in patched_main      
        main()
      File "c:\users\username\anaconda3\envs\project-name\lib\site-packages\click\core.py", line 829, in __call__
        return self.main(*args, **kwargs)
      File "c:\users\username\anaconda3\envs\project-name\lib\site-packages\click\core.py", line 782, in main
        rv = self.invoke(ctx)
      File "c:\users\username\anaconda3\envs\project-name\lib\site-packages\click\core.py", line 1066, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "c:\users\username\anaconda3\envs\project-name\lib\site-packages\click\core.py", line 610, in invoke
        return callback(*args, **kwargs)
      File "c:\users\username\anaconda3\envs\project-name\lib\site-packages\click\decorators.py", line 21, in new_func
        return f(get_current_context(), *args, **kwargs)
      File "c:\users\username\anaconda3\envs\project-name\lib\site-packages\black\__init__.py", line 394, in main
        stdin_filename=stdin_filename,
      File "c:\users\username\anaconda3\envs\project-name\lib\site-packages\black\__init__.py", line 445, in get_sources        
        gitignore = get_gitignore(root)
      File "c:\users\username\anaconda3\envs\project-name\lib\site-packages\black\files.py", line 122, in get_gitignore
        lines = gf.readlines()
    UnicodeDecodeError: 'cp949' codec can't decode byte 0xb0 in position 13: illegal multibyte sequence
    temeddix committed May 13, 2021
    Copy the full SHA
    b0100b5 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    6c3a7ea View commit details
    Browse the repository at this point in the history

Commits on May 14, 2021

  1. Revert "Made .gitignore File Reader Detect Its Encoding"

    This reverts commit 6c3a7ea.
    temeddix committed May 14, 2021
    Copy the full SHA
    fa3c5de View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    8c21ba8 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    50dd804 View commit details
    Browse the repository at this point in the history
  4. Revert "Made .gitignore Reader Open the File with Auto Encoding Detec…

    …ting"
    
    This reverts commit 50dd804.
    temeddix committed May 14, 2021
    Copy the full SHA
    b848bce View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    9cde20a View commit details
    Browse the repository at this point in the history
  6. Updated CHANGES.md for #2229

    temeddix committed May 14, 2021
    Copy the full SHA
    ae88e22 View commit details
    Browse the repository at this point in the history
  7. Updated CHANGES.md for #2229

    Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
    temeddix and JelleZijlstra committed May 14, 2021
    Copy the full SHA
    423f1cc View commit details
    Browse the repository at this point in the history

Commits on May 16, 2021

  1. Update CHANGES.md

    ambv committed May 16, 2021
    Copy the full SHA
    8c92b3d View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    26b6b20 View commit details
    Browse the repository at this point in the history
  3. Update CHANGES.md

    Co-authored-by: Richard Si <63936253+ichard26@users.noreply.github.com>
    temeddix and ichard26 committed May 16, 2021
    Copy the full SHA
    f637812 View commit details
    Browse the repository at this point in the history