]> git.ipfire.org Git - thirdparty/git.git/commitdiff
send-email: make_message_id use "require" instead of "use"
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Thu, 30 Sep 2010 13:43:08 +0000 (13:43 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 Sep 2010 19:20:33 +0000 (12:20 -0700)
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>
git-send-email.perl

index 1e7adc20916e1674c4437d4d4297e89f2a4d2e87..bfc6d4b45b1c7e2b9741eba5cfe323979751e7d2 100755 (executable)
@@ -819,7 +819,7 @@ sub make_message_id {
                last if (defined $du_part and $du_part ne '');
        }
        if (not defined $du_part or $du_part eq '') {
-               use Sys::Hostname qw();
+               require Sys::Hostname;
                $du_part = 'user@' . Sys::Hostname::hostname();
        }
        my $message_id_template = "<%s-git-send-email-%s>";