Invalid byte sequence in UTF-8

Ouverte
#850 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
Une demi-journée
Accessibilité débutants
30/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
git, ruby
Domaine
devtools

Piste de recherche

The trace points to win32_symlink? at lib/overcommit/utils/file_utils.rb:67, reached from store_modified_times in lib/overcommit/hook_context/helpers/stash_unstaged_changes.rb:64-65 during the pre-commit hook. Start by reading how the file's path or link target is read on Windows, and reproduce on Windows with a commit that has non-ASCII file names or content. Done means the commit completes without 'invalid byte sequence in UTF-8'; the issue has no comments or linked pull request, so confirm the current code still raises it before changing anything.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

In rubymine, Windows 11

00:35:49.370: [wardy_bot] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -f -- app/validators/updates/bot_command_validator.rb app/controllers/telegram_webhooks_router.rb app/services/user_panel/profile/chats/moderation/main_service.rb
00:35:49.435: [wardy_bot] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false commit -F C:\Users\Danyil\AppData\Local\Temp\git-commit-msg-.txt --
invalid byte sequence in UTF-8
C:/Ruby-on-Windows/3.2.2-1/lib/ruby/gems/3.2.0/gems/overcommit-0.63.0/lib/overcommit/utils/file_utils.rb:67:in `win32_symlink?'
C:/Ruby-on-Windows/3.2.2-1/lib/ruby/gems/3.2.0/gems/overcommit-0.63.0/lib/overcommit/utils/file_utils.rb:27:in `symlink?'
C:/Ruby-on-Windows/3.2.2-1/lib/ruby/gems/3.2.0/gems/overcommit-0.63.0/lib/overcommit/utils.rb:271:in `broken_symlink?'
C:/Ruby-on-Windows/3.2.2-1/lib/ruby/gems/3.2.0/gems/overcommit-0.63.0/lib/overcommit/hook_context/helpers/stash_unstaged_changes.rb:65:in `block in store_modified_times'
C:/Ruby-on-Windows/3.2.2-1/lib/ruby/gems/3.2.0/gems/overcommit-0.63.0/lib/overcommit/hook_context/helpers/stash_unstaged_changes.rb:64:in `each'
C:/Ruby-on-Windows/3.2.2-1/lib/ruby/gems/3.2.0/gems/overcommit-0.63.0/lib/overcommit/hook_context/helpers/stash_unstaged_changes.rb:64:in `store_modified_times'
C:/Ruby-on-Windows/3.2.2-1/lib/ruby/gems/3.2.0/gems/overcommit-0.63.0/lib/overcommit/hook_context/helpers/stash_unstaged_changes.rb:11:in `setup_environment'
C:/Ruby-on-Windows/3.2.2-1/lib/ruby/gems/3.2.0/gems/overcommit-0.63.0/lib/overcommit/hook_runner.rb:42:in `block in run'
C:/Ruby-on-Windows/3.2.2-1/lib/ruby/gems/3.2.0/gems/overcommit-0.63.0/lib/overcommit/interrupt_handler.rb:86:in `isolate_from_interrupts'
C:/Ruby-on-Windows/3.2.2-1/lib/ruby/gems/3.2.0/gems/overcommit-0.63.0/lib/overcommit/hook_runner.rb:30:in `run'
.git/hooks/pre-commit:87:in `<main>'
Langage dominant
Ruby
Étoiles
4k
Forks
288
Merge moyen
2 j 4 h
PR mergées (30 j)
18

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de sds/overcommit

Toutes les issues de sds/overcommit

Issues similaires

Plus d'issues Ruby

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.