Skip to content

Commit

Permalink
am: invoke perl's strftime in C locale
Browse files Browse the repository at this point in the history
We used to convert timestamps in metadata comment of Hg patch to
mbox-looking Date: field using strftime, without making sure the
resulting string is not translated.  Always use C locale for this.

Signed-off-by: Dmitry V. Levin <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
ldv-alt authored and gitster committed Jan 18, 2013
1 parent 0cfd112 commit 5185b97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-am.sh
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ split_patches () {
# Since we cannot guarantee that the commit message is in
# git-friendly format, we put no Subject: line and just consume
# all of the message as the body
perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 }
LANG=C LC_ALL=C perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 }
if ($subject) { print ; }
elsif (/^\# User /) { s/\# User/From:/ ; print ; }
elsif (/^\# Date /) {
Expand Down

0 comments on commit 5185b97

Please sign in to comment.