Skip to content

Commit 6f5ecad

Browse files
chriscoolgitster
authored andcommitted
perf/aggregate: fix checking ENV{GIT_PERF_SUBSECTION}
The way we check ENV{GIT_PERF_SUBSECTION} could trigger comparison between undef and "" that may be flagged by use of strict & warnings. Let's fix that. Signed-off-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5d445f3 commit 6f5ecad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/perf/aggregate.perl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ sub format_times {
7070
}
7171

7272
my $resultsdir = "test-results";
73-
if ($ENV{GIT_PERF_SUBSECTION} ne "") {
73+
if (exists $ENV{GIT_PERF_SUBSECTION} and $ENV{GIT_PERF_SUBSECTION} ne "") {
7474
$resultsdir .= "/" . $ENV{GIT_PERF_SUBSECTION};
7575
}
7676

0 commit comments

Comments
 (0)