Skip to content

Commit

Permalink
format-patch: run diff in C locale
Browse files Browse the repository at this point in the history
Otherwise it would show incomplete line and binary markers in
a locale dependent way.

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Junio C Hamano committed Nov 29, 2005
1 parent a004d3f commit 830273d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion git-format-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

. git-sh-setup

# Force diff to run in C locale.
LANG=C LC_ALL=C
export LANG LC_ALL

usage () {
echo >&2 "usage: $0"' [-n] [-o dir | --stdout] [--keep-subject] [--mbox]
[--check] [--signoff] [-<diff options>...]
Expand Down Expand Up @@ -202,7 +206,7 @@ process_one () {
;;
esac

eval "$(LANG=C LC_ALL=C sed -ne "$whosepatchScript" $commsg)"
eval "$(sed -ne "$whosepatchScript" $commsg)"
test "$author,$au" = ",$me" || {
mailScript="$mailScript"'
a\
Expand Down

0 comments on commit 830273d

Please sign in to comment.