Skip to content

Commit 5185b97

Browse files
ldv-altgitster
authored andcommitted
am: invoke perl's strftime in C locale
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]>
1 parent 0cfd112 commit 5185b97

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-am.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ split_patches () {
261261
# Since we cannot guarantee that the commit message is in
262262
# git-friendly format, we put no Subject: line and just consume
263263
# all of the message as the body
264-
perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 }
264+
LANG=C LC_ALL=C perl -M'POSIX qw(strftime)' -ne 'BEGIN { $subject = 0 }
265265
if ($subject) { print ; }
266266
elsif (/^\# User /) { s/\# User/From:/ ; print ; }
267267
elsif (/^\# Date /) {

0 commit comments

Comments
 (0)