I wrote quite a long script in Python which in several places calls git with Python subprocess and matches things that git returns for example:
nothing to commit, working tree clean
fast-forwardable
up to date
A colleague went to use the script and it did not behave as expected as their git was using a local German locale with messages like:
nichts zu committen, Arbeitsverzeichnis unverändert
I did not think of that at the time. Can see here and here some ideas for changing the language permanently.
Of course I don't want to alter the setup on the PCs where my script runs, is it possible to tell git to return in en_US
just for a single command?
Actually, when I wrote the script I had my system set to en_GB
and wonder if my git used en_GB
or en_US
and if there is any difference. Is it possible to ask git to tell you what language it is using? This is a secondary issue however, if it were possible to tell git to temporarily use en_US
would be enough.