From 52ea5f37acafa0947f398ab101d8498bcab9ca1d Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 25 Sep 2014 01:37:04 -0700 Subject: [PATCH] Clean up and update patches De-fuzz the git-send-email.perl patch. Add a git_gettext git-sh-i18n.sh patch. --- patches/git-send-email-improvements.diff | 14 ++++++-------- patches/git-sh-i18n-sh-git_gettext.diff | 22 ++++++++++++++++++++++ 2 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 patches/git-sh-i18n-sh-git_gettext.diff diff --git a/patches/git-send-email-improvements.diff b/patches/git-send-email-improvements.diff index 36cf1e1..e974180 100644 --- a/patches/git-send-email-improvements.diff +++ b/patches/git-send-email-improvements.diff @@ -1,8 +1,6 @@ -diff --git a/git-send-email.orig b/git-send-email.new -index f3d75e8..d0b4bff 100755 ---- a/git-send-email.orig -+++ b/git-send-email.new -@@ -27,6 +27,7 @@ use Data::Dumper; +--- a/git-send-email.perl ++++ b/git-send-email.perl +@@ -26,6 +26,7 @@ use Data::Dumper; use Term::ANSIColor; use File::Temp qw/ tempdir tempfile /; use File::Spec::Functions qw(catfile); @@ -10,7 +8,7 @@ index f3d75e8..d0b4bff 100755 use Error qw(:try); use Git; -@@ -300,6 +301,7 @@ my $rc = GetOptions("h" => \$help, +@@ -293,6 +294,7 @@ my $rc = GetOptions("h" => \$help, "smtp-server-option=s" => \@smtp_server_options, "smtp-server-port=s" => \$smtp_server_port, "smtp-user=s" => \$smtp_authuser, @@ -18,7 +16,7 @@ index f3d75e8..d0b4bff 100755 "smtp-pass:s" => \$smtp_authpass, "smtp-ssl" => sub { $smtp_encryption = 'ssl' }, "smtp-encryption=s" => \$smtp_encryption, -@@ -901,8 +903,10 @@ sub make_message_id { +@@ -902,8 +904,10 @@ sub make_message_id { require Sys::Hostname; $du_part = 'user@' . Sys::Hostname::hostname(); } @@ -30,7 +28,7 @@ index f3d75e8..d0b4bff 100755 #print "new message id = $message_id\n"; # Was useful for debugging } -@@ -1122,7 +1126,6 @@ To: $to${ccline} +@@ -1163,7 +1167,6 @@ To: $to${ccline} Subject: $subject Date: $date Message-Id: $message_id diff --git a/patches/git-sh-i18n-sh-git_gettext.diff b/patches/git-sh-i18n-sh-git_gettext.diff new file mode 100644 index 0000000..b937d88 --- /dev/null +++ b/patches/git-sh-i18n-sh-git_gettext.diff @@ -0,0 +1,22 @@ +--- a/git-sh-i18n.sh ++++ b/git-sh-i18n.sh +@@ -45,6 +45,19 @@ gnu) + # Use libintl's gettext.sh, or fall back to English if we can't. + . gettext.sh + ;; ++git_gettext) ++ # Use git-gettext and git-sh-i18n--envsubst ++ gettext () { ++ git gettext "$1" ++ } ++ ++ eval_gettext () { ++ git gettext "$1" | ( ++ export PATH $(git sh-i18n--envsubst --variables "$1"); ++ git sh-i18n--envsubst "$1" ++ ) ++ } ++ ;; + gettext_without_eval_gettext) + # Solaris has a gettext(1) but no eval_gettext(1) + eval_gettext () { -- 2.11.4.GIT