Skip to content

Commit

Permalink
send-email: make_message_id use "require" instead of "use"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ævar Arnfjörð Bjarmason authored and Junio C Hamano committed Sep 30, 2010
1 parent 5e2c2ab commit 529dd38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -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>";
Expand Down

0 comments on commit 529dd38

Please sign in to comment.