mirror of
https://github.com/git/git
synced 2024-10-28 19:25:47 +00:00
Merge branch 'ah/chainlint-cpuinfo-parse-fix'
The format of a line in /proc/cpuinfo that describes a CPU on s390x looked different from everybody else, and the code in chainlint.pl failed to parse it. * ah/chainlint-cpuinfo-parse-fix: chainlint.pl: fix /proc/cpuinfo regexp
This commit is contained in:
commit
8a40cb1e5a
1 changed files with 1 additions and 1 deletions
|
@ -709,7 +709,7 @@ sub ncores {
|
||||||
# Windows
|
# Windows
|
||||||
return $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});
|
return $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});
|
||||||
# Linux / MSYS2 / Cygwin / WSL
|
# Linux / MSYS2 / Cygwin / WSL
|
||||||
do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor\s*:/, <>)); } if -r '/proc/cpuinfo';
|
do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor[\s\d]*:/, <>)); } if -r '/proc/cpuinfo';
|
||||||
# macOS & BSD
|
# macOS & BSD
|
||||||
return qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;
|
return qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue