X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=commitid.scad.pl;h=35bc341ff4e2043fd64c4228d70548943211ae65;hb=a5961eb9e6773583860d8bb196ca9a0db9582bdd;hp=983a4abc08abf4a5b8423705bb59058357f35d5b;hpb=d9669daa23ac69bdd05d2afc2b1ae69644f03a1a;p=reprap-play.git diff --git a/commitid.scad.pl b/commitid.scad.pl index 983a4ab..35bc341 100755 --- a/commitid.scad.pl +++ b/commitid.scad.pl @@ -538,11 +538,11 @@ sub do_git () { if (defined($git_count)) { my $smallstr = rjustt($sz, $git_count, $git_dirty); - if (defined($git_object) && $sz >= length($git_count) + 3) { - $smallstr = $git_object; - $smallstr .= ($git_dirty || ' '); - $smallstr .= $git_count; - $smallstr = rjustt($sz, $smallstr); + my $forgitobj = $sz - length($git_count) - 1; + if (defined($git_object) && $forgitobj >= 2) { + $smallstr = rjustt($forgitobj, $git_object). + ($git_dirty || ' '). + $git_count; } genform_plusq("Small$sz", $smallstr); }