diff options
author | Eric Wong <e@yhbt.net> | 2020-01-11 22:34:57 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-01-13 04:36:39 +0000 |
commit | ed3e1ad3bb9c07835dee97c76b4454b98faf0dcd (patch) | |
tree | 4062b6fa62926ebcd4f102c2d613864a982adb14 /lib/PublicInbox/Git.pm | |
parent | 6d8658803b0f75ccdc54d16c8fda4e2cfaed0388 (diff) | |
download | public-inbox-ed3e1ad3bb9c07835dee97c76b4454b98faf0dcd.tar.gz |
File::Glob is loaded by the perl for the "glob()" op, anyways, so call bsd_glob with the GLOB_NOSORT to avoid needless sorting of the output.
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r-- | lib/PublicInbox/Git.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index 0ace907e..15f53495 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -11,6 +11,7 @@ use strict; use warnings; use POSIX qw(dup2); use IO::Handle; # ->autoflush +use File::Glob qw(bsd_glob GLOB_NOSORT); use PublicInbox::Spawn qw(spawn popen_rd); use PublicInbox::Tmpfile; use base qw(Exporter); @@ -276,7 +277,7 @@ sub packed_bytes { my ($self) = @_; my $n = 0; my $pack_dir = git_path($self, 'objects/pack'); - foreach my $p (glob("$pack_dir/*.pack")) { + foreach my $p (bsd_glob("$pack_dir/*.pack", GLOB_NOSORT)) { $n += -s $p; } $n |