chiark / gitweb /
commitid: Pass $bestwhat to do_some_best (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 12 Feb 2016 01:43:08 +0000 (01:43 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 12 Feb 2016 01:43:08 +0000 (01:43 +0000)
commitid.scad.pl

index 0af0115b410e3c6c4405e64199ea5ae947c3f185..68bd4cebf441b09ad4c66edc9e09746e9e7229eb 100755 (executable)
@@ -565,7 +565,8 @@ sub do_git () {
 }
 
 sub do_some_best ($$) {
-    my ($modname, $formre) = @_;
+    my ($bestwhat, $formre) = @_;
+    my $modname = "Best$bestwhat";
     my $fullmodname = "Commitid_${modname}_2D";
     my @argl = qw(max_sz margin=Commitid_pixelsz());
     p "module $fullmodname(".argl_formal(@argl).") {\n";
@@ -628,8 +629,8 @@ sub do_git_best () {
     # (decreasing), and then by number of lines (increasing) and
     # try each one both ways round.
 
-    do_some_best('BestCount', 'Small|Full') if $do_git =~ m/c/;
-    do_some_best('BestObjid', 'Git|Full') if $do_git =~ m/o/;
+    do_some_best('Count', 'Small|Full') if $do_git =~ m/c/;
+    do_some_best('Objid', 'Git|Full') if $do_git =~ m/o/;
 }
 
 while (@ARGV) {