Bug: rebase when an author uses accents in name on MacOSx
- From
- Lanny Ripple <lanny@spotinfluence.com>
- Date
- May 30, 2012, 22:16 UTC
- Message-ID
- <06DD2F56-F956-46DF-84A4-3443D4702CDE@spotinfluence.com>
Hello,
I've come across behavior I'd say is a bug.
We have a developer with an accent in his name, Rémi Leblond. Very recently we stopped being able to rebase getting the error
lanny(master);<work/IdeaProjects/Piper> git rebase master rl-clean292 First, rewinding head to replay your work on top of it... /sw/lib/git-core/git-am: line 692: Leblond: command not found Patch does not have a valid e-mail address. lanny((ae6c220...)|REBASE);<work/IdeaProjects/Piper>
Versions 1.7.10.2 is (now?) exhibiting this behavior. We've been rebasing fine for several month which is why I wonder if being on MacOSX is involved? (I'm at 10.7.4) Some digging shows the root cause to be in function get_author_ident_from_commit at line 210 of git-core/git-sh-setup, namely the sed with environment overrides LANG=C LC_ALL=C. This causes git-am to incorrectly build the .git/rebase-apply/author-script.
lanny((ae6c220...)|REBASE);<work/IdeaProjects/Piper> cat .git/rebase-apply/author-script GIT_AUTHOR_NAME='R'émi Leblond GIT_AUTHOR_EMAIL='remi@spotinfluence.com' GIT_AUTHOR_DATE='@1335301038 -0600'
From the command-line
lanny;~> echo $LANG en_US.UTF-8 lanny;~> echo $LC_ALL
lanny;~> echo "Rémi Leblond" | LANG=C LC_ALL=C sed -ne 's/.*/GIT_AUTHOR_NAME='\''&'\''/p' GIT_AUTHOR_NAME='R'émi Leblond lanny;~> echo "Rémi Leblond" | sed -ne 's/.*/GIT_AUTHOR_NAME='\''&'\''/p' GIT_AUTHOR_NAME='Rémi Leblond'
I can work around it easily enough by editing git-sh-setup to remove the locale overrides but thought a bug report might be useful.
Enjoy, -ljr
--- Lanny Ripple lanny@spotinfluence.com