chiark / gitweb /
commitid.scad.pl: put dirty marker to lh of cout
[reprap-play.git] / commitid.scad.pl
index fbeed6fe1a4518f42374901c003303f342b3d7c3..de571668f8d9d64df1b7b4d408f5a91c57c1a0d6 100755 (executable)
@@ -275,8 +275,8 @@ sub rjustt ($$;$) { # right justify and truncate (ie, pad and truncate at left)
     my $lw = length $whole;
     my $spare = $sz - $lw - (length $prefix);
     return
-       $prefix.
        ($spare > 0 ? (' ' x $spare) : '').
+       $prefix.
        substr($whole, ($spare < 0 ? -$spare : 0));
 }
 
@@ -361,7 +361,7 @@ sub do_git () {
     foreach my $sz (3..10) {
        gentextmodule_demo_start_batch($sz-3);
 
-       gentextmodule_plusq("Small$sz", rjustt($sz, $git_count.$git_dirty))
+       gentextmodule_plusq("Small$sz", rjustt($sz, $git_count$git_dirty))
            if defined $git_count;
 
        gentextmodule_plusq("Git$sz", ljustt($sz, $git_object, $git_dirty))
@@ -369,8 +369,8 @@ sub do_git () {
 
        if (defined $git_count && defined $git_object) {
            gentextmodule("Full$sz",
-                         ljustt($sz, $git_object, ''),
-                         rjustt($sz, $git_count.$git_dirty));
+                         ljustt($sz, $git_object),
+                         rjustt($sz, $git_count$git_dirty));
 
            if (!($sz % 2)) {
                my $e = $sz/2;