Zend certified PHP/Magento developer

git is unable to properly determine the terminal width (git-bash, windows)

screenshot of terminal with the issue

As you can see in the screenshot, the terminal is currently 100 characters wide, and both methods of detecting such that I’m aware of are returning the correct value. Despite this, unless I explicitly set the --width option to 100, git column seems to fall back to 80 as the terminal width. This behavior isn’t necessarily unexpected, as the documentation for git column states:

--width=<width>
Specify the terminal width. By default git column will detect the terminal width, or fall back to 80 if it is unable to do so.

So it seems obvious that git is unable to determine the number of columns in my terminal. The question then is: why? I was unable to locate any documentation about how this detection is done.

Here’s some (possibly) relevant system information:

$ git --version
git version 2.43.0.windows.1
$ systeminfo | grep -i 'OS Name|OS Version'
OS Name:                   Microsoft Windows 11 Pro
OS Version:                10.0.22631 N/A Build 22631

I can provide any other relevant sections of my bash configuration files and/or other details about my system’s setup.