diff options
author | Steve McIntyre <steve@einval.com> | 2018-06-06 15:33:08 +0100 |
---|---|---|
committer | Steve McIntyre <steve@einval.com> | 2018-06-06 15:46:04 +0100 |
commit | 51b28351dee24ec4203aff79cf4e32e8a4d64c78 (patch) | |
tree | e9e911e36322e4d4da98177b67f9bc8d1498e1eb /Perl/Local | |
parent | dc8e650802e2c48020d717e1ee48596fd5442fbb (diff) |
If we don't find a rev, return undef properly
Previous code was printing an error then incorrectly continuing
Diffstat (limited to 'Perl/Local')
-rw-r--r-- | Perl/Local/VCS_git.pm | 3 |
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; |