]> git.donarmstrong.com Git - bin.git/commitdiff
change how determine_vcs works slightly
authorDon Armstrong <don@donarmstrong.com>
Tue, 14 May 2013 23:58:29 +0000 (16:58 -0700)
committerDon Armstrong <don@donarmstrong.com>
Tue, 14 May 2013 23:58:29 +0000 (16:58 -0700)
archive_analysis

index 54e53c6ffe3ce237afaf49060f274177322ce111..2294a4b6ce065c80ef35bc192648ecf84753a54c 100755 (executable)
@@ -93,7 +93,7 @@ for my $file (@ARGV) {
     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");
     }
@@ -139,7 +139,10 @@ sub determine_vcs {
 }
 
 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();