Skip to content

git-gui:handle the encoding of Git's output correctly #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2015

Conversation

dscho
Copy link
Member

@dscho dscho commented Mar 13, 2015

If we use 'eval exec $opt $cmdp $args' to execute git command,
tcl engine will convert the output of the git comand with the rule
system default code page to unicode.

But cp936 -> unicode conversion implicitly done by exec is not reversible.
So we have to use git_read instead.

Bug report and an original reproducer by Cloud Chou:
msysgit#302

Karsten Blees writes this code patch.
Cloud Chou find the reason of the bug.

Thanks-to: dscho
Thanks-to: patthoyts
Signed-off-by: Karsten Blees [email protected]
Original-test-by: Cloud Chou [email protected]
Signed-off-by: Cloud Chou [email protected]
Signed-off-by: Johannes Schindelin [email protected]

If we use 'eval exec $opt $cmdp $args' to execute git command,
tcl engine will convert the output of the git comand with the rule
system default code page to unicode.

But cp936 -> unicode conversion implicitly done by exec is not reversible.
So we have to use git_read instead.

Bug report and an original reproducer by Cloud Chou:
msysgit#302

Karsten Blees writes this code patch.
Cloud Chou find the reason of the bug.

Thanks-to: dscho
Thanks-to: patthoyts
Signed-off-by: Karsten Blees <[email protected]>
Original-test-by: Cloud Chou <[email protected]>
Signed-off-by: Cloud Chou <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member Author

dscho commented Mar 13, 2015

I just analyzed what commits need porting from msysGit's Git fork, and it seems only this one is necessary. The commits on maint-1.9 are backports with the exception of the home fix which is no longer necessary because we dropped the get_home_directory() patch in favor of setting the HOME environment variable in the Git wrapper (or in Git Bash).

Therefore, we are two Pull Requests (this one and #34) and a merging rebase to 2.3.2 short of a new tag...

@dscho
Copy link
Member Author

dscho commented Mar 15, 2015

Okay, I realize that it was overly bureaucratic to make this a Pull Request. We already had this as a Pull Request for msysGit's master branch and accepted it. Given the fact that we are all busy with things, I therefore just merge this myself.

dscho added a commit that referenced this pull request Mar 15, 2015
git-gui:handle the encoding of Git's output correctly
@dscho dscho merged commit d596a2a into git-for-windows:master Mar 15, 2015
@dscho dscho deleted the from-msysgit branch March 15, 2015 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants