if (not defined $vcs) {
fail("Unable to determine which VCS this is");
}
- my $revision = find_vcs_revision($vcs,$file);
+ my $revision = find_vcs_revision($file,$vcs);
if (not defined $revision) {
fail("Unable to determine which revision this is");
}
}
sub find_vcs_revision{
- my ($vcs,$file) = @_;
+ my ($file,$vcs) = @_;
+ if (not defined $vcs) {
+ $vcs = determine_vcs($file);
+ }
if ($vcs eq 'git') {
my $old_dir = getcwd();