aboutsummaryrefslogtreecommitdiffstats
path: root/Perl
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2018-06-06 15:33:08 +0100
committerSteve McIntyre <steve@einval.com>2018-06-06 15:46:04 +0100
commit51b28351dee24ec4203aff79cf4e32e8a4d64c78 (patch)
treee9e911e36322e4d4da98177b67f9bc8d1498e1eb /Perl
parentdc8e650802e2c48020d717e1ee48596fd5442fbb (diff)
If we don't find a rev, return undef properly
Previous code was printing an error then incorrectly continuing
Diffstat (limited to 'Perl')
-rw-r--r--Perl/Local/VCS_git.pm3
1 files changed, 2 insertions, 1 deletions
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;

© 2014-2024 Faster IT GmbH | imprint | privacy policy