From 51b28351dee24ec4203aff79cf4e32e8a4d64c78 Mon Sep 17 00:00:00 2001 From: Steve McIntyre Date: Wed, 6 Jun 2018 15:33:08 +0100 Subject: If we don't find a rev, return undef properly Previous code was printing an error then incorrectly continuing --- Perl/Local/VCS_git.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Perl') diff --git a/Perl/Local/VCS_git.pm b/Perl/Local/VCS_git.pm index 74484374ba8..c11e536af98 100644 --- a/Perl/Local/VCS_git.pm +++ b/Perl/Local/VCS_git.pm @@ -556,8 +556,9 @@ sub count_changes # Not found print STDERR "count_changes() ERROR: commit rev2 $rev2 not found in revisions of $file\n"; $ret = undef; + } else { + $ret = $pos1 - $pos2; } - $ret = $pos1 - $pos2; # Now return to the directory where we started chdir($startdir); return $ret; -- cgit v1.2.3