Skip to content

Git crashes while typing command on Powershell terminal #4504

@warpstrike

Description

@warpstrike

Hello, I randomly came across this bug when typing the special character : "
It is very repeatable and happens everytime I try to type a command git command with certain special charaters like: "$ git ci -m "commit message"
An exception is thrown at the first " character I type, and an error message is prompted, asking to report the bug.
I noticed that the same bug happens with other special characters, but only on git commands. I have tried many, including:
$ git co -b "branch_name"
$ git branch -v
$ git rebase -i HEAD~4

Some of the characters that SEEM to be affected: " , & ' ( ) { } @
Some of the characters that DO NOT SEEM to be affected: _ - + ~ é è \ ` ^ $ * ù % £ ¤ : ; ? ! §

I also noticed that RIGHT AFTER being prompted the error message, the terminal lets me type any git command successfully without issue (including the characters that previously failed), until I press Enter again and the bug reappears.

I am using a French keyboard on Windows 10 Pro, with PowerShell as a command terminal.
$ git version
git version 2.48.1.windows.1

Below is the error message printed on my terminal :

Image

Oups, un problème s'est produit. Signalez ce bogue avec les détails ci-dessous.
Signaler sur GitHub : https://github.com/lzybkr/PSReadLine/issues/new

Dernières 200 touches :
s t Enter
Enter
Enter
Enter
g i t Space a d d Space u i / Backspace Backspace Backspace Backspace Backspace Backspace Backspace c i Space - m Space " g t i Backspace Backspace i t Space r e b a s e Space ( Enter
Enter
g i t Space r e b a s e Space - i Space H E A D Ctrl+Alt+` Ctrl+Alt+~ Ctrl+Alt+~ Backspace Ctrl+c Enter
Enter
Enter
g i t Space c i Space ( Enter
g i t Space c o Space é & Enter
Enter
Enter
g i t Space b r a n c h Space " Enter
Enter
Enter
g i t Space c o Space - b Space " g i t Space b r a n c h Space " Enter
g i t Space c o Space Backspace Backspace i Space " Enter
g i t Space c i Space - m Space Ctrl+Alt+@ Ctrl+c Enter
g i t Space c i Space m Backspace - m Space " g i t Space c i Space - m " Enter
Enter
g i t Space c i Space - m Space _ è - (

Exception :
System.ArgumentOutOfRangeException: La valeur doit être supérieure ou égale à zéro et inférieure à la taille de la mémoire tampon de la console dans cette dimension.
Nom du paramètre : left
La valeur réelle était -1.
à System.Console.SetCursorPosition(Int32 left, Int32 top)
à Microsoft.PowerShell.Internal.VirtualTerminal.set_CursorLeft(Int32 value)
à Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor)
à Microsoft.PowerShell.PSConsoleReadLine.ForceRender()
à Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c)
à Microsoft.PowerShell.PSConsoleReadLine.SelfInsert(Nullable1 key, Object arg) à Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
à Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
à Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions