Skip to content

Commit 529dd38

Browse files
avargitster
authored andcommitted
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 <[email protected]: Avery Pennarun <[email protected]> Reviewed-by: Jeff King <[email protected]> > Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5e2c2ab commit 529dd38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-send-email.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ sub make_message_id {
819819
last if (defined $du_part and $du_part ne '');
820820
}
821821
if (not defined $du_part or $du_part eq '') {
822-
use Sys::Hostname qw();
822+
require Sys::Hostname;
823823
$du_part = 'user@' . Sys::Hostname::hostname();
824824
}
825825
my $message_id_template = "<%s-git-send-email-%s>";

0 commit comments

Comments
 (0)