aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve McIntyre <steve@einval.com>2018-05-31 10:07:09 +0100
committerSteve McIntyre <steve@einval.com>2018-05-31 10:07:09 +0100
commit4f0b0a121c47544abfbb0966e98163bf45cddfd7 (patch)
tree65627d2e74ff554ad9814130717cf89fb9fd9aa7
parent2c43b29254dd338a75116c207b5f1dbfb7cbf8ea (diff)
Fix ordering of count_changes() properly
-rw-r--r--Perl/Local/VCS_git.pm2
-rwxr-xr-xstattrans.pl2
2 files changed, 2 insertions, 2 deletions
diff --git a/Perl/Local/VCS_git.pm b/Perl/Local/VCS_git.pm
index 410bf81c785..136d19f4153 100644
--- a/Perl/Local/VCS_git.pm
+++ b/Perl/Local/VCS_git.pm
@@ -336,7 +336,7 @@ sub count_changes
print "ERROR: commit $rev2 not found in revisions of $file\n";
return undef;
}
- return $pos2 - $pos1;
+ return $pos1 - $pos2;
}
# return the type of the input argument (file, dir, symlink, etc)
diff --git a/stattrans.pl b/stattrans.pl
index de43989822f..7f70175bcbe 100755
--- a/stattrans.pl
+++ b/stattrans.pl
@@ -261,7 +261,7 @@ sub check_translation
# Here we compare the original version with the translated one and print
# a note for the user if their first or last numbers are too far apart
# From translation-check.wml
- my $version_diff = $VCS->count_changes($orig_file, $version, $translation);
+ my $version_diff = $VCS->count_changes($orig_file, $translation, $version);
if (!defined $version_diff) {
print "check_translation: error from count_changes for orig_file $orig_file, file $file\n";
} else {

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