@matheusbsbs / matheus-bagliano / commits / 529dd386dd
Fork 0

send-email: make_message_id use "require" instead of "use"

Change the use of Sys::Hostname from a "use" to a "require". The former happens in an implicit BEGIN block and is thus immune from the if block it's contained in, so it's always loaded. This should speed up the invocation of git-send-email by a few milliseconds. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.comReviewed-by: Avery Pennarun <apenwarr@gmail.com> Reviewed-by: Jeff King <peff@peff.net> > Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Sep 30, 2010 at 13:43 UTC 529dd386dda6c6e6d0dad801785d2d943756fb3f
1 file changed +1 -1
git-send-email.perl
+1 -1
@@ -819,7 +819,7 @@ sub make_message_id {
819 last if (defined $du_part and $du_part ne '');
820 }
821 if (not defined $du_part or $du_part eq '') {
822 - use Sys::Hostname qw();
822 + require Sys::Hostname;
823 $du_part = 'user@' . Sys::Hostname::hostname();
824 }
825 my $message_id_template = "<%s-git-send-email-%s>";