2013/2/1 csware <notifications@github.com>

> In src/TortoiseProc/GitProgressDlg.cpp:
>
> > @@ -824,11 +842,22 @@ bool CGitProgressDlg::SetBackgroundImage(UINT nID)
> >
> >  void CGitProgressDlg::ReportGitError()
> >  {
> > -	const git_error *err = giterr_last();
> > -	if (err == nullptr)
> > -		ReportError(_T("An error occoured in libgit2, but no message is available."));
> > -	else
> > -		ReportError(CUnicodeUtils::GetUnicode(giterr_last()->message));
> > +	const git_error * err;
> > +	err = giterr_last();
> > +	CStringA str;
> > +	if (err)
> > +	{
> > +		str.Format("libgit2 error %d: %s", err->klass, err->message);
> > +		/* libgit2 combine some windows native message to error message, so we use CP_ACP, not CP_UTF8
> > +		 * But it is possible problem when use UTF8 path. libgit2 message should use unified encode.
> > +		 */
> > +		ReportError(CString(CUnicodeUtils::GetUnicode(str, CP_ACP)));
>
> Where libgit2 does use windows native error messages?
>
Sorry, I have not looking for the point. But I see libgit2 report some
Chinese Error message. I think  it should be come from windows' get last
error.

>  —
> Reply to this email directly or view it on GitHub<https://github.com/TortoiseGit/TortoiseGit/pull/32/files#r2857862>.
>
>