Dear all,

sorry for chiming in so late, I should have done so earlier, being the 
maintainer of the GNU sed package in Fink. Now, I am not sure if the "git team" 
and "sed team" referred to here are the upstream authors or the Fink package 
maintainers... But in any case, let me mention what I know so far:

First off, I can reproduce a problem between git and the GNU sed package. In 
fact, I just run into this myself a short time ago, while working on converting 
a big old CVS repository to git, and making extensive use of "git 
filter-branch". It got stuck in a similar place as Lanny observed. And it also 
was with a name containing a non-ASCII, unicode character.

Thus, it seems the problem is with how GNU sed vs. the system sed handle 
non-ASCII encodings. This matches very nicely with the minimal example Lanny 
constructed (thanks for that):

On 5/31/12 12:14 PM, Lanny Ripple wrote:
> Git uses the sed found on the PATH in git-am.  When using sed compiled by 
> fink it gives incorrect results.
> 
> System sed (expected):
> 
>  lanny;~> echo "Rémi Leblond" | LANG=C LC_ALL=C /usr/bin/sed -ne 
> 's/.*/GIT_AUTHOR_NAME='\''&'\''/p'
>  GIT_AUTHOR_NAME='Rémi Leblond'
> 
> fink sed (unexpected.  .* breaks at é):
> 
>  lanny;~> echo "Rémi Leblond" | LANG=C LC_ALL=C /sw64/bin/sed -ne 
> 's/.*/GIT_AUTHOR_NAME='\''&'\''/p'
>  GIT_AUTHOR_NAME='R'émi Leblond

Interestingly, GNU sed works fine when setting LANG=en_EN.UTF-8, and not 
setting LC_ALL:

 echo "Rémi Leblond" | LANG=en_US.UTF-8 gsed -ne "s/.*/'&'/p"

So, this all boils down to encoding resp. locale settings. Some googling then 
revealed this: 
<http://old.nabble.com/Fwd%3A-GNU-sed-version-4.2.1%3A-on-OS-X,-C-locale-gets-aliased-to-UTF-8-td33946970.html>.
 Based on this, I put in a workaround that works for me and now. But I'll try 
to discuss this with upstream to find a proper long-term solution.

In the meantime, sed 4.2.1-3 should hopefully deal with the problem above, 
without introducing regressions (finger's crossed)

Cheers,
Max
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fink-users mailing list
Fink-users@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.macosx.fink.user
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to