Re: Encoding problem on OSX?
Hi;
On Wed, Aug 11, 2010 at 10:55 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 13 quoted lines
> İsmail Dönmez wrote:
>
>> [~]> printf 'Th\360\235\204\236s\n' | sed 's/.*//g'
>>
>> [ismail@havana][08:51:06]
>> [~]>
>
> Thanks for checking. So sed is not completely broken. Could you try
>
> sh t4201-shortlog.sh
> cd "trash directory.t4201-shortlog"
> git log
> cat "trash directory.t4201-shortlog/log"
First of all note that this is not Mac's default sed but instead GNU sed:
GNU sed version 4.2.1 Copyright (C) 2009 Free Software Foundation, Inc.
Now the output of what you requested;
[~/Sources/git/t]> sh t4201-shortlog.sh
ok 1 - setup
not ok - 2 default output format
#
# git shortlog HEAD >log &&
# fuzz log >log.predictable &&
# test_cmp expect.template log.predictable
#
ok 3 - pretty format
ok 4 - --abbrev
ok 5 - output from user-defined format is re-wrapped
ok 6 - shortlog wrapping
ok 7 - shortlog from non-git directory
ok 8 - shortlog encoding
# failed 1 among 8 test(s)
1..8
[ismail@havana][11:18:24]
[~/Sources/git/t]> cd "trash directory.t4201-shortlog"
[ismail@havana][11:18:33]
[~/Sources/git/t/trash directory.t4201-shortlog]> git log
commit ef6c19b4846d6a3e41f9a3ce746a3bffae653c17
Author: Jöhännës "Dschö" Schindëlin <Johannes.Schindelin@gmx.de>
Date: Wed Aug 11 08:18:24 2010 +0000
set a1 to 3 and some non-ASCII chars: áæï
commit d7c0787d081716755e2863f612d171846f503d4f
Author: Jöhännës "Dschö" Schindëlin <Johannes.Schindelin@gmx.de>
Date: Wed Aug 11 08:18:24 2010 +0000
set a1 to 2 and some non-ASCII chars: Äßø
commit 7e9687adfe33f5d2050f0fc4ab5004f324d3559f
Author: A U Thor <author@example.com>
Date: Wed Aug 11 08:18:24 2010 +0000
Test
[~/Sources/git/t/trash directory.t4201-shortlog]> cat log
commit 5fc75f5794d1cd8575fc3e2e86f9c0e1aa31723e
Author: Someone else <not!me>
Date: Wed Aug 11 08:18:24 2010 +0000
Commit by someone else
commit 0f5955f471a9d882b0e869752614b5123af19da3
Author: A U Thor <author@example.com>
Date: Wed Aug 11 08:18:24 2010 +0000
a 12 34 56 78
commit 0bb7d083233c266d9051b283913bd83000c9001f
Author: A U Thor <author@example.com>
Date: Wed Aug 11 08:18:24 2010 +0000
Th????s ????s a very, very long f????rst l????ne for the comm????t
message to see ????f ????t ????s wrapped correctly
commit 03a5a848c658751c51925127820491bf2a94a752
Author: A U Thor <author@example.com>
Date: Wed Aug 11 08:18:24 2010 +0000
Th𝄞s 𝄞s a very, very long f𝄞rst l𝄞ne for the comm𝄞t message
to see 𝄞f 𝄞t 𝄞s wrapped correctly
commit fdfc106190118f705dee70b56930764007353922
Author: A U Thor <author@example.com>
Date: Wed Aug 11 08:18:24 2010 +0000
This is a very, very long first line for the commit message to see
if it is wrapped correctly
commit 7e9687adfe33f5d2050f0fc4ab5004f324d3559f
Author: A U Thor <author@example.com>
Date: Wed Aug 11 08:18:24 2010 +0000
Test