# git log --oneline and git log --pretty=format... give differrent outputs

2 messages from 2011-07-22 to 2011-07-22. Participants: Shumkin Alexey, Alexey Shumkin.
Thread: https://gitlist.dev/t/27883

## Shumkin Alexey, 2011-07-22 07:06

Subject: git log --oneline and git log --pretty=format... give differrent outputs
Message-ID: <20110722110618.10a62631@zappedws>
URL: https://gitlist.dev/e/20110722110618.10a62631%40zappedws

```
Hello everybody!

I have a repository. Basic development is on Windows platform (under
Cygwin). I have commit messages on Russian, so 
i18n.commitEncoding = i18n.logOutputtEncoding = cp1251. It's ok.
I works fine on Windows.
When I run on Windows 
git log --graph --oneline
and 
git log --graph --pretty=format:'%C(yellow)%h %Creset%s'

I get two identical outputs which look like
*   ae0a70f merge v2.6.54 into v3.0
|\  
| * 581e071 + explicit changelog mail content-type (for claws-mail)...
| * 9bafb65 fixed: changelog does not recognize Mantis...
| * f417e91 fixed: #82 (Добавить в программу возможность...
| * 8553efa fixed: #87 (2.6.53 Добавить для рассылки e-mail...
....

But when I run the same commands (for the same repository and current
commit, of course) on Linux machine (ru_RU.UTF-8 locale; Guake,
xterm, gnome-terminal, etc ) I get different outputs

git log --graph --oneline
gives output identical to Windows (see above)
but
git log --graph --pretty=format:'%C(yellow)%h %Creset%s'
gives
*   ae0a70f merge v2.6.54 into v3.0
|\  
| * 581e071 + explicit changelog mail content-type (for claws-mail)...
| * 9bafb65 fixed: changelog does not recognize Mantis...
| * f417e91 fixed: #82 (<C4><EE><E1><E0><E2><E8><F2><FC>...
| * 8553efa fixed: #87 (2.6.53<C4><EE><E1><E0><E2><E8><F2><FC>...

i.e. non-UTF-8 characters are represented with their codes and not
converted to UTF-8 as they are for "git log --graph --oneline"

So, the question - why? I thought both commands use the same log output
mechanism.
As I can edit Git sources but I'm not familiar to C well, so one
more question "Where exactly in sources to fix it fast?"

Thanks

```

## Alexey Shumkin, 2011-07-22 07:53

Subject: Re: git log --oneline and git log --pretty=format... give differrent outputs
Message-ID: <loom.20110722T094944-284@post.gmane.org>
URL: https://gitlist.dev/e/loom.20110722T094944-284%40post.gmane.org
In-Reply-To: <20110722110618.10a62631@zappedws>

```
Oh! I've fixed it!
A patch I'll provide soon

```
