Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

how to customize the code page of the commit git-hoock message box?

alexandr_dragunkin September 8, 2023

sourcetree_err_msg.png

Windows operating system

I use the following script \.git\hooks\commit-msg

#!/bin/sh

d:/VENV37/Scripts/activate.bat
COMMIT_MSG_FILE=$1

d:/VENV37/Scripts/python .git/hooks/commit-msg.py "$COMMIT_MSG_FILE"

How to get the correct display of characters in the console if the file is in UTF-8?

2 answers

1 accepted

0 votes
Answer accepted
alexandr_dragunkin September 8, 2023

In addition to the previous message

The terminal displays a message if I switch the character set to cp1251

But switching the encoding in \.git\hooks\commit-msg.py to cp1251 does not give any result

sourcetree_terminal_encode.png

0 votes
alexandr_dragunkin September 8, 2023

Won! Indeed, some kind of symbol crept in. This behavior occurs if, when writing text, you correct the spelling using PuntoSwitcher. Apparently, this program leaves some traces when correcting the text.

I had to rewrite the text of the message completely carefully by hand and everything worked.

изображение_2023-09-08_205703268.png

Everything is beautiful in the terminal!

sourcetree_terminal_fix.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events